diff options
Diffstat (limited to 'drivers/leds/leds-sc27xx-bltc.c')
-rw-r--r-- | drivers/leds/leds-sc27xx-bltc.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/leds/leds-sc27xx-bltc.c b/drivers/leds/leds-sc27xx-bltc.c index 0ede87420bfc..e199ea15e406 100644 --- a/drivers/leds/leds-sc27xx-bltc.c +++ b/drivers/leds/leds-sc27xx-bltc.c @@ -276,12 +276,12 @@ static int sc27xx_led_register(struct device *dev, struct sc27xx_led_priv *priv) static int sc27xx_led_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; - struct device_node *np = dev->of_node, *child; + struct device_node *np = dev_of_node(dev), *child; struct sc27xx_led_priv *priv; u32 base, count, reg; int err; - count = of_get_child_count(np); + count = of_get_available_child_count(np); if (!count || count > SC27XX_LEDS_MAX) return -EINVAL; @@ -305,7 +305,7 @@ static int sc27xx_led_probe(struct platform_device *pdev) return err; } - for_each_child_of_node(np, child) { + for_each_available_child_of_node(np, child) { err = of_property_read_u32(child, "reg", ®); if (err) { of_node_put(child); |