summaryrefslogtreecommitdiff
path: root/drivers/leds/leds-88pm860x.c
diff options
context:
space:
mode:
authorMarek BehĂșn <marek.behun@nic.cz>2020-09-18 01:32:54 +0300
committerPavel Machek <pavel@ucw.cz>2020-09-26 22:56:39 +0300
commit8853c95e997e0a3621bd8718bdaded81ed37bc9a (patch)
treef0bd3a4907901243e12ce8a18caf1a8d313e7f3c /drivers/leds/leds-88pm860x.c
parent2779f4724b2ff0f296313e5987d10a6ec2c2ebd5 (diff)
downloadlinux-8853c95e997e0a3621bd8718bdaded81ed37bc9a.tar.xz
leds: various: use dev_of_node(dev) instead of dev->of_node
The dev_of_node function should be preferred. Signed-off-by: Marek BehĂșn <marek.behun@nic.cz> Cc: Orson Zhai <orsonzhai@gmail.com> Cc: Baolin Wang <baolin.wang7@gmail.com> Cc: Chunyan Zhang <zhang.lyra@gmail.com> Cc: Sean Wang <sean.wang@mediatek.com> Cc: Matthias Brugger <matthias.bgg@gmail.com> Cc: Riku Voipio <riku.voipio@iki.fi> Signed-off-by: Pavel Machek <pavel@ucw.cz>
Diffstat (limited to 'drivers/leds/leds-88pm860x.c')
-rw-r--r--drivers/leds/leds-88pm860x.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/leds/leds-88pm860x.c b/drivers/leds/leds-88pm860x.c
index 465c3755cf2e..2d1b3269e0f7 100644
--- a/drivers/leds/leds-88pm860x.c
+++ b/drivers/leds/leds-88pm860x.c
@@ -118,9 +118,9 @@ static int pm860x_led_dt_init(struct platform_device *pdev,
struct device_node *nproot, *np;
int iset = 0;
- if (!pdev->dev.parent->of_node)
+ if (!dev_of_node(pdev->dev.parent))
return -ENODEV;
- nproot = of_get_child_by_name(pdev->dev.parent->of_node, "leds");
+ nproot = of_get_child_by_name(dev_of_node(pdev->dev.parent), "leds");
if (!nproot) {
dev_err(&pdev->dev, "failed to find leds node\n");
return -ENODEV;