Skip to content

Commit

Permalink
drivers/leds/ledtrig-timer.c: fix broken sysfs delay handling
Browse files Browse the repository at this point in the history
Fix regression introduced by commit 5ada28b ("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>
  • Loading branch information
Johan Hovold authored and Linus Torvalds committed Sep 15, 2011
1 parent 1ebe9da commit 7a5caab
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/leds/ledtrig-timer.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down Expand Up @@ -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;
}

Expand Down

0 comments on commit 7a5caab

Please sign in to comment.