This is the natural counter part to the already existing led_get_trigger_data(). Acked-by: Pavel Machek <pavel@xxxxxx> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@xxxxxxxxxxxxxx> --- include/linux/leds.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/include/linux/leds.h b/include/linux/leds.h index d2325b98a053..0a728235c3fe 100644 --- a/include/linux/leds.h +++ b/include/linux/leds.h @@ -303,6 +303,12 @@ extern int led_trigger_set(struct led_classdev *led_cdev, struct led_trigger *trigger); extern void led_trigger_remove(struct led_classdev *led_cdev); +static inline void led_set_trigger_data(struct led_classdev *led_cdev, + void *trigger_data) +{ + led_cdev->trigger_data = trigger_data; +} + static inline void *led_get_trigger_data(struct led_classdev *led_cdev) { return led_cdev->trigger_data; @@ -338,6 +344,7 @@ static inline int led_trigger_set(struct led_classdev *led_cdev, } static inline void led_trigger_remove(struct led_classdev *led_cdev) {} +static inline void led_set_trigger_data(struct led_classdev *led_cdev) {} static inline void *led_get_trigger_data(struct led_classdev *led_cdev) { return NULL; -- 2.18.0