提交 7a5caabd 编写于 作者: J Johan Hovold 提交者: Linus Torvalds

drivers/leds/ledtrig-timer.c: fix broken sysfs delay handling

Fix regression introduced by commit 5ada28bf ("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: NJohan Hovold <jhovold@gmail.com>
Acked-by: NFlorian Fainelli <florian@openwrt.org>
Acked-by: NRichard Purdie <richard.purdie@linuxfoundation.org>
Cc: <stable@kernel.org>		[2.6.37+]
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 1ebe9dad
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册