soc/samsung: use kbasename instead of open coding
PATCH 1/1 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 <[email protected]>
Cc Kukjin Kim <[email protected]>
Cc Krzysztof Kozlowski <[email protected]>
Cc Javier Martinez Canillas <[email protected]>
Cc linux-arm-kernel at lists.infradead.org
Cc linux-samsung-soc at vger.kernel.org
--- drivers/soc/samsung/pm_domains.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/soc/samsung/pm_domains.c +1 -1
@@ -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 ); }
--
2.11.0
Quoted 9 lines · Rob Herring
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 <[email protected]>Cc Kukjin Kim <[email protected]>Cc Krzysztof Kozlowski <[email protected]>Cc Javier Martinez Canillas <[email protected]>Cc linux-arm-kernel at lists.infradead.orgCc linux-samsung-soc at vger.kernel.org
Quoted 4 lines
--- drivers/soc/samsung/pm_domains.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Thanks, applied, with slightly changed title.
Best regards,
Krzysztof