diff options
author | Németh Márton <nm127@freemail.hu> | 2008-03-09 23:54:37 +0300 |
---|---|---|
committer | Richard Purdie <rpurdie@rpsys.net> | 2008-04-25 02:34:18 +0400 |
commit | 0013b23d66a2768f5babbb0ea9f03ab067a990d8 (patch) | |
tree | 14d60a50bb68e422767a268cd737f70ef4e6e19d /drivers/leds/leds.h | |
parent | b3ba31f84ea041c0945b5904d4c407ce14b2b72c (diff) | |
download | linux-0013b23d66a2768f5babbb0ea9f03ab067a990d8.tar.xz |
leds: disable triggers on brightness set
Disable any active triggers when the brightness attribute is
set to zero.
Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Signed-off-by: Márton Németh <nm127@freemail.hu>
Signed-off-by: Richard Purdie <rpurdie@rpsys.net>
Diffstat (limited to 'drivers/leds/leds.h')
-rw-r--r-- | drivers/leds/leds.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/leds/leds.h b/drivers/leds/leds.h index 12b6fe93b135..0214799639f7 100644 --- a/drivers/leds/leds.h +++ b/drivers/leds/leds.h @@ -27,6 +27,11 @@ static inline void led_set_brightness(struct led_classdev *led_cdev, led_cdev->brightness_set(led_cdev, value); } +static inline int led_get_brightness(struct led_classdev *led_cdev) +{ + return led_cdev->brightness; +} + extern struct rw_semaphore leds_list_lock; extern struct list_head leds_list; @@ -34,9 +39,11 @@ extern struct list_head leds_list; void led_trigger_set_default(struct led_classdev *led_cdev); void led_trigger_set(struct led_classdev *led_cdev, struct led_trigger *trigger); +void led_trigger_remove(struct led_classdev *led_cdev); #else #define led_trigger_set_default(x) do {} while(0) #define led_trigger_set(x, y) do {} while(0) +#define led_trigger_remove(x) do {} while(0) #endif ssize_t led_trigger_store(struct device *dev, struct device_attribute *attr, |