[126/244] drivers/leds/ledtrig-timer.c: fix broken sysfs delay handling

From: Greg KH
Date: Wed Sep 28 2011 - 19:09:30 EST


3.0-stable review patch. If anyone has any objections, please let us know.

------------------

From: Johan Hovold <jhovold@xxxxxxxxx>

commit 7a5caabd090b8f7d782c40fc1c048d798f2b6fd7 upstream.

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@xxxxxxxxx>
Acked-by: Florian Fainelli <florian@xxxxxxxxxxx>
Acked-by: Richard Purdie <richard.purdie@xxxxxxxxxxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
Signed-off-by: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxx>

---
drivers/leds/ledtrig-timer.c | 2 ++
1 file changed, 2 insertions(+)

--- a/drivers/leds/ledtrig-timer.c
+++ b/drivers/leds/ledtrig-timer.c
@@ -41,6 +41,7 @@ static ssize_t led_delay_on_store(struct

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(struc

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



--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/