summaryrefslogtreecommitdiff
path: root/drivers/leds/leds-ns2.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/leds/leds-ns2.c')
-rw-r--r--drivers/leds/leds-ns2.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/leds/leds-ns2.c b/drivers/leds/leds-ns2.c
index 9cbd2d7251af..22d38c83b6dc 100644
--- a/drivers/leds/leds-ns2.c
+++ b/drivers/leds/leds-ns2.c
@@ -251,7 +251,7 @@ ns2_leds_get_of_pdata(struct device *dev, struct ns2_led_platform_data *pdata)
struct ns2_led *led, *leds;
int ret, num_leds = 0;
- num_leds = of_get_child_count(np);
+ num_leds = of_get_available_child_count(np);
if (!num_leds)
return -ENODEV;
@@ -261,7 +261,7 @@ ns2_leds_get_of_pdata(struct device *dev, struct ns2_led_platform_data *pdata)
return -ENOMEM;
led = leds;
- for_each_child_of_node(np, child) {
+ for_each_available_child_of_node(np, child) {
const char *string;
int i, num_modes;
struct ns2_led_modval *modval;