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>
This commit is contained in:

committed by
Richard Purdie

parent
b3ba31f84e
commit
0013b23d66
@@ -51,6 +51,9 @@ static ssize_t led_brightness_store(struct device *dev,
|
||||
|
||||
if (count == size) {
|
||||
ret = count;
|
||||
|
||||
if (state == LED_OFF)
|
||||
led_trigger_remove(led_cdev);
|
||||
led_set_brightness(led_cdev, state);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user