aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/leds/led-class.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/leds/led-class.c')
-rw-r--r--drivers/leds/led-class.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/leds/led-class.c b/drivers/leds/led-class.c
index 63aad90247c4..a8dd59ebedf8 100644
--- a/drivers/leds/led-class.c
+++ b/drivers/leds/led-class.c
@@ -51,6 +51,9 @@ static ssize_t led_brightness_store(struct device *dev,
51 51
52 if (count == size) { 52 if (count == size) {
53 ret = count; 53 ret = count;
54
55 if (state == LED_OFF)
56 led_trigger_remove(led_cdev);
54 led_set_brightness(led_cdev, state); 57 led_set_brightness(led_cdev, state);
55 } 58 }
56 59