diff --git a/drivers/led/Kconfig b/drivers/led/Kconfig index a37ec633fb6..1cd3638cb16 100644 --- a/drivers/led/Kconfig +++ b/drivers/led/Kconfig @@ -11,6 +11,7 @@ config LED config LED_BOOT bool "Enable LED boot support" + depends on LED help Enable LED boot support. @@ -22,6 +23,7 @@ config LED_BOOT config LED_ACTIVITY bool "Enable LED activity support" + depends on LED help Enable LED activity support. diff --git a/drivers/led/led-uclass.c b/drivers/led/led-uclass.c index edcdeee1e9a..1efdbe272c3 100644 --- a/drivers/led/led-uclass.c +++ b/drivers/led/led-uclass.c @@ -65,6 +65,9 @@ int led_get_by_label(const char *label, struct udevice **devp) /* Ignore the top-level LED node */ if (uc_plat->label && !strcmp(label, uc_plat->label)) return uclass_get_device_tail(dev, 0, devp); + + if (!strcmp(label, ofnode_get_name(dev_ofnode(dev)))) + return uclass_get_device_tail(dev, 0, devp); } return -ENODEV;