summaryrefslogtreecommitdiffstats
path: root/drivers/leds/ledtrig-timer.c
diff options
context:
space:
mode:
authorJohan Hovold2011-09-15 01:22:16 +0200
committerLinus Torvalds2011-09-15 03:09:38 +0200
commit7a5caabd090b8f7d782c40fc1c048d798f2b6fd7 (patch)
tree0f59b3271ece4b248b40a515cec440a2411753b3 /drivers/leds/ledtrig-timer.c
parentdrivers/misc/pti.c: give 'comm' function scope in pti_control_frame_built_and... (diff)
downloadkernel-qcow2-linux-7a5caabd090b8f7d782c40fc1c048d798f2b6fd7.tar.gz
kernel-qcow2-linux-7a5caabd090b8f7d782c40fc1c048d798f2b6fd7.tar.xz
kernel-qcow2-linux-7a5caabd090b8f7d782c40fc1c048d798f2b6fd7.zip
drivers/leds/ledtrig-timer.c: fix broken sysfs delay handling
Fix regression introduced by commit 5ada28bf7675 ("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. Signed-off-by: Johan Hovold <jhovold@gmail.com> Acked-by: Florian Fainelli <florian@openwrt.org> Acked-by: Richard Purdie <richard.purdie@linuxfoundation.org> Cc: <stable@kernel.org> [2.6.37+] Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/leds/ledtrig-timer.c')
-rw-r--r--drivers/leds/ledtrig-timer.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/leds/ledtrig-timer.c b/drivers/leds/ledtrig-timer.c
index d87c9d02f786..328c64c0841c 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;
}