mediatek: leds-smartrg: handle disabled LEDs
authorRosen Penev <rosenp@gmail.com>
Tue, 8 Oct 2024 23:39:07 +0000 (16:39 -0700)
committerHauke Mehrtens <hauke@hauke-m.de>
Sat, 19 Oct 2024 17:19:38 +0000 (19:19 +0200)
If LEDs are disabled, they should not be handled.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16651
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
target/linux/mediatek/files/drivers/leds/leds-smartrg-system.c

index 385f85d6da0ee04a4c55a84b2b4edc8cd34317b6..c1770aa81b59d552a217f96fdc94649b2e77be23 100644 (file)
@@ -177,7 +177,7 @@ srg_led_probe(struct i2c_client *client)
 
        i2c_set_clientdata(client, sysled_ctrl);
 
-       for_each_child_of_node(np, child) {
+       for_each_available_child_of_node(np, child) {
                if (srg_led_init_led(sysled_ctrl, child))
                        continue;