]> git.baikalelectronics.ru Git - kernel.git/commit
leds: fix brightness changing when software blinking is active
authorStas Sergeev <stsp@list.ru>
Thu, 14 May 2015 15:24:02 +0000 (08:24 -0700)
committerBryan Wu <cooloney@gmail.com>
Mon, 25 May 2015 20:26:47 +0000 (13:26 -0700)
commit828d98f342f3d3eec8f9fe72724847bd55a53b31
treeb9156a89d62a210dccc24f958a9b34be0891cd47
parentf540bbb05165e0ec197f3e7fd0e456b2689c02dd
leds: fix brightness changing when software blinking is active

The following sequence:
echo timer >/sys/class/leds/<name>/trigger
echo 1 >/sys/class/leds/<name>/brightness
should change the ON brightness for blinking.
The function led_set_brightness() was mistakenly initiating the
delayed blink stop procedure, which resulted in no blinking with
the timer trigger still active.

This patch fixes the problem by changing led_set_brightness()
to not initiate the delayed blink stop when brightness is not 0.

CC: Richard Purdie <rpurdie@rpsys.net>
CC: Kyungmin Park <kyungmin.park@samsung.com>
CC: linux-leds@vger.kernel.org
CC: linux-kernel@vger.kernel.org
Acked-by: Jacek Anaszewski <j.anaszewski@samsung.com>
Signed-off-by: Stas Sergeev <stsp@users.sourceforge.net>
Signed-off-by: Bryan Wu <cooloney@gmail.com>
drivers/leds/led-class.c
drivers/leds/led-core.c