forked from OERV-BSP/u-boot
Merge patch series "led: fixes"
Patrice Chotard <patrice.chotard@foss.st.com> says: - Update led_get_by_label() - Fix led Kconfig Link: https://lore.kernel.org/r/20251009130844.11703-1-patrice.chotard@foss.st.com
This commit is contained in:
@@ -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.
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user