This helps to simplify modules that provide a simple led_trigger. It's inspired by module_platform_driver, module_i2c_driver et al. Acked-by: Pavel Machek <pavel@xxxxxx> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@xxxxxxxxxxxxxx> --- include/linux/leds.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/linux/leds.h b/include/linux/leds.h index 33484a5c7478..a3ee10846a4b 100644 --- a/include/linux/leds.h +++ b/include/linux/leds.h @@ -326,6 +326,10 @@ static inline void *led_get_trigger_data(struct led_classdev *led_cdev) extern void led_trigger_rename_static(const char *name, struct led_trigger *trig); +#define module_led_trigger(__led_trigger) \ + module_driver(__led_trigger, led_trigger_register, \ + led_trigger_unregister) + #else /* Trigger has no members */ -- 2.18.0