diff options
Diffstat (limited to 'drivers/leds/leds-88pm860x.c')
-rw-r--r-- | drivers/leds/leds-88pm860x.c | 4 |
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; |