Skip to contentSkip to conversation

leds: triggers: autoload default trigger module based on name

PATCH New [email protected] 1 participant 1 message Mar 6 LED

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 leds: triggers: autoload default trigger module based on name

From: Dennis Gilmore <[email protected]>

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.

---
 drivers/leds/led-triggers.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/leds/led-triggers.c +1 -1
index b1223218bda1..b88da1c27548 100644
@@ -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);
 
Signature · 1 line
2.53.0