diff options
author | Fabio Baltieri <fabio.baltieri@gmail.com> | 2012-06-06 21:12:34 +0200 |
---|---|---|
committer | Bryan Wu <bryan.wu@canonical.com> | 2012-07-24 01:52:34 +0200 |
commit | 437864828d82b9dee50b5741106fbf5fa12b139a (patch) | |
tree | 356c64833d43ff01b36277aa7bcf556e6ee367b1 /Documentation/leds | |
parent | ledtrig-ide-disk: use generic one-shot blink api (diff) | |
download | linux-437864828d82b9dee50b5741106fbf5fa12b139a.tar.xz linux-437864828d82b9dee50b5741106fbf5fa12b139a.zip |
leds: fix led_brightness_set when soft-blinking
Move led_stop_software_blink() code into led_brightness_set() to ensure
software blink timer is stopped and cleared when changing trigger.
Also use led_set_brightness() instead of calling
led_cdev->brightness_set() directly to keep led_cdev->brightness
consistent with current LED status.
This ensure proper cleaning when changing triggers, as without this fix
a LED may be turned off while leaving it's led_cdev->brightness = 1,
leading to an erratic software-blink behaviour.
The problem was easy to reproduce by changing the trigger from "timer"
to "oneshot".
Signed-off-by: Fabio Baltieri <fabio.baltieri@gmail.com>
Signed-off-by: Bryan Wu <bryan.wu@canonical.com>
Diffstat (limited to 'Documentation/leds')
0 files changed, 0 insertions, 0 deletions