lkml.org 
[lkml]   [2011]   [Sep]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] leds: ledtrig-timer: fix broken sysfs delay handling
Date
Fix regression introduced by commit
5ada28bf76752e33dce3d807bf0dfbe6d1b943ad (led-class: always implement
blinking) which broke sysfs delay handling by not storing the updated
value. Consequently it was only possible to set one of the delays
through the sysfs interface as the other delay was automatically
restored to it's default value. Reading the parameters always gave the
defaults.

Cc: stable@kernel.org
Signed-off-by: Johan Hovold <jhovold@gmail.com>
---
drivers/leds/ledtrig-timer.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/drivers/leds/ledtrig-timer.c b/drivers/leds/ledtrig-timer.c
index d87c9d0..328c64c 100644
--- a/drivers/leds/ledtrig-timer.c
+++ b/drivers/leds/ledtrig-timer.c
@@ -41,6 +41,7 @@ static ssize_t led_delay_on_store(struct device *dev,

if (count == size) {
led_blink_set(led_cdev, &state, &led_cdev->blink_delay_off);
+ led_cdev->blink_delay_on = state;
ret = count;
}

@@ -69,6 +70,7 @@ static ssize_t led_delay_off_store(struct device *dev,

if (count == size) {
led_blink_set(led_cdev, &led_cdev->blink_delay_on, &state);
+ led_cdev->blink_delay_off = state;
ret = count;
}

--
1.7.6


\
 
 \ /
  Last update: 2011-09-05 17:35    [W:0.082 / U:0.560 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site