]> www.infradead.org Git - users/jedix/linux-maple.git/commit
leds: turn the blink_timer off before starting to blink
authorAntonio Ospite <ospite@studenti.unina.it>
Tue, 1 Nov 2011 00:12:22 +0000 (17:12 -0700)
committerMaxim Uvarov <maxim.uvarov@oracle.com>
Thu, 8 Dec 2011 19:17:47 +0000 (11:17 -0800)
commit9ebd2eb58cad4077aa7d1e0a752e64865799f645
treeb4135835fb3502bb9ee9de058ededf25146bd0e4
parent70f08a312719f675523b1a38a85e19c9b32b7581
leds: turn the blink_timer off before starting to blink

commit 488bc35bf40df89d37486c1826b178a2fba36ce7 upstream.

Depending on the implementation of the hardware blinking function in
blink_set(), the led can support hardware blinking for some values of
delay_on and delay_off and fall-back to software blinking for some other
values.

Turning off the blink_timer unconditionally before starting to blink
make sure that a sequence like:

  OFF
  hardware blinking
  software blinking
  hardware blinking

does not leave the software blinking timer active.

Signed-off-by: Antonio Ospite <ospite@studenti.unina.it>
Reviewed-by: Johannes Berg <johannes@sipsolutions.net>
Cc: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/leds/led-class.c