[PATCH] backlight: pm8941: Convert to using %pOFn instead of device_node.name
Rob Herring
robh at kernel.org
Tue Aug 28 01:52:49 UTC 2018
In preparation to remove the node name pointer from struct device_node,
convert printf users to use the %pOFn format specifier.
Cc: Lee Jones <lee.jones at linaro.org>
Cc: Daniel Thompson <daniel.thompson at linaro.org>
Cc: Jingoo Han <jingoohan1 at gmail.com>
Cc: Bartlomiej Zolnierkiewicz <b.zolnierkie at samsung.com>
Cc: dri-devel at lists.freedesktop.org
Cc: linux-fbdev at vger.kernel.org
Signed-off-by: Rob Herring <robh at kernel.org>
---
drivers/video/backlight/pm8941-wled.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/video/backlight/pm8941-wled.c b/drivers/video/backlight/pm8941-wled.c
index 0b6d21955d91..da6aab20fdcb 100644
--- a/drivers/video/backlight/pm8941-wled.c
+++ b/drivers/video/backlight/pm8941-wled.c
@@ -330,7 +330,7 @@ static int pm8941_wled_configure(struct pm8941_wled *wled, struct device *dev)
rc = of_property_read_string(dev->of_node, "label", &wled->name);
if (rc)
- wled->name = dev->of_node->name;
+ wled->name = devm_kasprintf(dev, GFP_KERNEL, "%pOFn", dev->of_node);
*cfg = pm8941_wled_config_defaults;
for (i = 0; i < ARRAY_SIZE(u32_opts); ++i) {
--
2.17.1
More information about the dri-devel
mailing list