[PATCH] leds: triggers: autoload default trigger module based on name
From: dennis
Date: Fri Mar 06 2026 - 00:08:50 EST
From: Dennis Gilmore <dennis@xxxxxxxx>
we attempt to autoload the module if it is defined in the dtb as the
default trigger. however none of the modules provide an alias of
"ledtrig:<default trigger>" change the : to a - so that the module is
picked up by its existing name. For example: ledtrig-heartbeat loads
while "ledtrig:heartbeat" is not found.
Signed-off-by: Dennis Gilmore <dennis@xxxxxxxx>
---
drivers/leds/led-triggers.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/leds/led-triggers.c b/drivers/leds/led-triggers.c
index b1223218bda1..b88da1c27548 100644
--- a/drivers/leds/led-triggers.c
+++ b/drivers/leds/led-triggers.c
@@ -309,7 +309,7 @@ void led_trigger_set_default(struct led_classdev *led_cdev)
* Once loaded it will re-probe with all led_cdev's.
*/
if (!found)
- request_module_nowait("ledtrig:%s", led_cdev->default_trigger);
+ request_module_nowait("ledtrig-%s", led_cdev->default_trigger);
}
EXPORT_SYMBOL_GPL(led_trigger_set_default);
--
2.53.0