]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
soc: samsung: Use kbasename instead of open coding
authorRob Herring <robh@kernel.org>
Tue, 18 Jul 2017 21:43:30 +0000 (16:43 -0500)
committerKrzysztof Kozlowski <krzk@kernel.org>
Mon, 24 Jul 2017 04:47:50 +0000 (06:47 +0200)
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>
drivers/soc/samsung/pm_domains.c

index a6a5d807cc2bae5a1b2cc4fbbc7c39136fe12e20..b3d36aed784f68d9356e37cd0a7b07cc9328e03b 100644 (file)
@@ -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);
 }