diff options
author | Marek BehĂșn <marek.behun@nic.cz> | 2020-09-18 00:32:54 +0200 |
---|---|---|
committer | Pavel Machek <pavel@ucw.cz> | 2020-09-26 21:56:39 +0200 |
commit | 8853c95e997e0a3621bd8718bdaded81ed37bc9a (patch) | |
tree | f0bd3a4907901243e12ce8a18caf1a8d313e7f3c /drivers/leds/leds-mc13783.c | |
parent | leds: various: use device_get_match_data (diff) | |
download | linux-8853c95e997e0a3621bd8718bdaded81ed37bc9a.tar.xz linux-8853c95e997e0a3621bd8718bdaded81ed37bc9a.zip |
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-mc13783.c')
-rw-r--r-- | drivers/leds/leds-mc13783.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/leds/leds-mc13783.c b/drivers/leds/leds-mc13783.c index 5cd810c545f3..ee37f4a2d65b 100644 --- a/drivers/leds/leds-mc13783.c +++ b/drivers/leds/leds-mc13783.c @@ -121,7 +121,7 @@ static struct mc13xxx_leds_platform_data __init *mc13xxx_led_probe_dt( if (!pdata) return ERR_PTR(-ENOMEM); - parent = of_get_child_by_name(dev->parent->of_node, "leds"); + parent = of_get_child_by_name(dev_of_node(dev->parent), "leds"); if (!parent) goto out_node_put; @@ -192,7 +192,7 @@ static int __init mc13xxx_led_probe(struct platform_device *pdev) leds->master = mcdev; platform_set_drvdata(pdev, leds); - if (dev->parent->of_node) { + if (dev_of_node(dev->parent)) { pdata = mc13xxx_led_probe_dt(pdev); if (IS_ERR(pdata)) return PTR_ERR(pdata); |