[openwrt/openwrt] mediatek: leds-smartrg: handle disabled LEDs

LEDE Commits lede-commits at lists.infradead.org
Sat Oct 19 10:21:01 PDT 2024


hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/a6252a6dfcdddc5c2a97ac29695e9f9f004a4430

commit a6252a6dfcdddc5c2a97ac29695e9f9f004a4430
Author: Rosen Penev <rosenp at gmail.com>
AuthorDate: Tue Oct 8 16:39:07 2024 -0700

    mediatek: leds-smartrg: handle disabled LEDs
    
    If LEDs are disabled, they should not be handled.
    
    Signed-off-by: Rosen Penev <rosenp at gmail.com>
    Link: https://github.com/openwrt/openwrt/pull/16651
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 target/linux/mediatek/files/drivers/leds/leds-smartrg-system.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/linux/mediatek/files/drivers/leds/leds-smartrg-system.c b/target/linux/mediatek/files/drivers/leds/leds-smartrg-system.c
index 385f85d6da..c1770aa81b 100644
--- a/target/linux/mediatek/files/drivers/leds/leds-smartrg-system.c
+++ b/target/linux/mediatek/files/drivers/leds/leds-smartrg-system.c
@@ -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;
 




More information about the lede-commits mailing list