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 b441cc6601c6..d2325b98a053 100644 --- a/include/linux/leds.h +++ b/include/linux/leds.h @@ -308,6 +308,10 @@ static inline void *led_get_trigger_data(struct led_classdev *led_cdev) return led_cdev->trigger_data; } +#define module_led_trigger(__led_trigger) \ + module_driver(__led_trigger, led_trigger_register, \ + led_trigger_unregister) + #else /* Trigger has no members */ -- 2.17.1