soc: samsung: Use kbasename instead of open coding
In preparation to not store the full path of nodes in full_name, use kbasename instead as it will work either with the full path or not. Signed-off-by: Rob Herring <robh@kernel.org> Cc: Kukjin Kim <kgene@kernel.org> Cc: Krzysztof Kozlowski <krzk@kernel.org> Cc: linux-samsung-soc@vger.kernel.org Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
This commit is contained in:
parent
5771a8c088
commit
e83a719811
|
@ -147,7 +147,7 @@ static __init const char *exynos_get_domain_name(struct device_node *node)
|
|||
const char *name;
|
||||
|
||||
if (of_property_read_string(node, "label", &name) < 0)
|
||||
name = strrchr(node->full_name, '/') + 1;
|
||||
name = kbasename(node->full_name);
|
||||
return kstrdup_const(name, GFP_KERNEL);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue