diff options
author | Uwe Kleine-König <u.kleine-koenig@pengutronix.de> | 2018-07-02 16:05:25 -0400 |
---|---|---|
committer | Jacek Anaszewski <jacek.anaszewski@gmail.com> | 2018-07-05 17:21:11 -0400 |
commit | 9acc560de2aac73ef99c54f0fdfb86b4684296b5 (patch) | |
tree | 65c55f4de04e970dcec30c6196d04b3446206ffd /include/linux/leds.h | |
parent | a0b750768371e410d77b60bcf49c18bd45078d55 (diff) |
leds: triggers: new function led_set_trigger_data()
This is the natural counter part to the already existing
led_get_trigger_data().
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Jacek Anaszewski <jacek.anaszewski@gmail.com>
Diffstat (limited to 'include/linux/leds.h')
-rw-r--r-- | include/linux/leds.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/linux/leds.h b/include/linux/leds.h index a3ee10846a4b..834683d603f9 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, | |||
303 | struct led_trigger *trigger); | 303 | struct led_trigger *trigger); |
304 | extern void led_trigger_remove(struct led_classdev *led_cdev); | 304 | extern void led_trigger_remove(struct led_classdev *led_cdev); |
305 | 305 | ||
306 | static inline void led_set_trigger_data(struct led_classdev *led_cdev, | ||
307 | void *trigger_data) | ||
308 | { | ||
309 | led_cdev->trigger_data = trigger_data; | ||
310 | } | ||
311 | |||
306 | static inline void *led_get_trigger_data(struct led_classdev *led_cdev) | 312 | static inline void *led_get_trigger_data(struct led_classdev *led_cdev) |
307 | { | 313 | { |
308 | return led_cdev->trigger_data; | 314 | return led_cdev->trigger_data; |
@@ -356,6 +362,7 @@ static inline int led_trigger_set(struct led_classdev *led_cdev, | |||
356 | } | 362 | } |
357 | 363 | ||
358 | static inline void led_trigger_remove(struct led_classdev *led_cdev) {} | 364 | static inline void led_trigger_remove(struct led_classdev *led_cdev) {} |
365 | static inline void led_set_trigger_data(struct led_classdev *led_cdev) {} | ||
359 | static inline void *led_get_trigger_data(struct led_classdev *led_cdev) | 366 | static inline void *led_get_trigger_data(struct led_classdev *led_cdev) |
360 | { | 367 | { |
361 | return NULL; | 368 | return NULL; |