[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20170718214339.7774-50-robh@kernel.org>
Date: Tue, 18 Jul 2017 16:43:30 -0500
From: Rob Herring <robh@...nel.org>
To: Kukjin Kim <kgene@...nel.org>,
Krzysztof Kozlowski <krzk@...nel.org>,
Javier Martinez Canillas <javier@....samsung.com>
Cc: linux-kernel@...r.kernel.org, devicetree@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org,
linux-samsung-soc@...r.kernel.org
Subject: [PATCH] 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@...nel.org>
Cc: Kukjin Kim <kgene@...nel.org>
Cc: Krzysztof Kozlowski <krzk@...nel.org>
Cc: Javier Martinez Canillas <javier@....samsung.com>
Cc: linux-arm-kernel@...ts.infradead.org
Cc: linux-samsung-soc@...r.kernel.org
---
drivers/soc/samsung/pm_domains.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/soc/samsung/pm_domains.c b/drivers/soc/samsung/pm_domains.c
index c630eba32066..7c4fec1f93b5 100644
--- a/drivers/soc/samsung/pm_domains.c
+++ b/drivers/soc/samsung/pm_domains.c
@@ -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
Powered by blists - more mailing lists