mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] leds: triggers: autoload default trigger module based on name
@ 2026-03-06  5:08 dennis
  0 siblings, 0 replies; only message in thread
From: dennis @ 2026-03-06  5:08 UTC (permalink / raw)
  To: Lee Jones, Pavel Machek; +Cc: linux-leds, linux-kernel, Dennis Gilmore

From: Dennis Gilmore <dennis@ausil.us>

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@ausil.us>
---
 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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-03-06  5:08 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-03-06  5:08 [PATCH] leds: triggers: autoload default trigger module based on name dennis

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®