diff options
author | Hauke Mehrtens <hauke@hauke-m.de> | 2015-06-28 21:45:55 +0200 |
---|---|---|
committer | Hauke Mehrtens <hauke@hauke-m.de> | 2015-06-28 23:45:25 +0200 |
commit | cd32ea4ee677420801c1989d2ae7dce92800bc29 (patch) | |
tree | 416a37012ea2cf85d191695a37f0cae4acd4eeb8 | |
parent | af3846081570a7888899ffcc1fe9d3a5be4ab933 (diff) |
header: add led_trigger_remove() prototpye
The led_trigger_remove() function is exported on older kernel versions,
but there is no pubic prototype for this function. Now the first driver
makes use of this function and this patch adds the prototype.
There is no LINUX_BACKPORT() guard here because we want it to point to
the original function which is exported normally.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
-rw-r--r-- | backport/backport-include/linux/leds.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/backport/backport-include/linux/leds.h b/backport/backport-include/linux/leds.h index 22679cff..2044abfd 100644 --- a/backport/backport-include/linux/leds.h +++ b/backport/backport-include/linux/leds.h @@ -26,6 +26,18 @@ #define led_set_brightness(_dev, _switch) led_brightness_set(_dev, _switch) #endif /* LINUX_VERSION_CODE < KERNEL_VERSION(3,6,0) */ +#if LINUX_VERSION_CODE < KERNEL_VERSION(4,2,0) +/* + * There is no LINUX_BACKPORT() guard here because we want it to point to + * the original function which is exported normally. + */ +#ifdef CONFIG_LEDS_TRIGGERS +extern void led_trigger_remove(struct led_classdev *led_cdev); +#else +static inline void led_trigger_remove(struct led_classdev *led_cdev) {} +#endif +#endif + #include <backport/leds-disabled.h> #endif /* __BACKPORT_LINUX_LEDS_H */ |