diff options
author | Rafal Prylowski <prylowski@metasoft.pl> | 2012-05-28 11:35:54 -0400 |
---|---|---|
committer | Bryan Wu <bryan.wu@canonical.com> | 2012-06-11 22:56:24 -0400 |
commit | 3fbd8716da4c69ddbb76c022f3f4a0d50723c68f (patch) | |
tree | 052b895fc8290e7756a3492fc1fada0c65cce808 /drivers/leds | |
parent | cfaf025112d3856637ff34a767ef785ef5cf2ca9 (diff) |
leds: don't disable blinking when writing the same value to delay_on or delay_off
Function led_set_software_blink() assumes that blink timer is still running,
but commit 488bc35bf40df89d37486c1826b178a2fba36ce7 introduced disabling
of blink timer before each call to led_set_software_blink().
Correct led_software_blink():
1) remove protection against reprogramming blink timer to the same values,
because it only disables blinking now,
2) remove unnecessary call to led_stop_software_blink().
Signed-off-by: Rafal Prylowski <prylowski@metasoft.pl>
Cc: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Bryan Wu <bryan.wu@canonical.com>
Diffstat (limited to 'drivers/leds')
-rw-r--r-- | drivers/leds/led-core.c | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/drivers/leds/led-core.c b/drivers/leds/led-core.c index d6860043f6f9..d65353d8d3fc 100644 --- a/drivers/leds/led-core.c +++ b/drivers/leds/led-core.c | |||
@@ -44,13 +44,6 @@ static void led_set_software_blink(struct led_classdev *led_cdev, | |||
44 | if (!led_cdev->blink_brightness) | 44 | if (!led_cdev->blink_brightness) |
45 | led_cdev->blink_brightness = led_cdev->max_brightness; | 45 | led_cdev->blink_brightness = led_cdev->max_brightness; |
46 | 46 | ||
47 | if (led_get_trigger_data(led_cdev) && | ||
48 | delay_on == led_cdev->blink_delay_on && | ||
49 | delay_off == led_cdev->blink_delay_off) | ||
50 | return; | ||
51 | |||
52 | led_stop_software_blink(led_cdev); | ||
53 | |||
54 | led_cdev->blink_delay_on = delay_on; | 47 | led_cdev->blink_delay_on = delay_on; |
55 | led_cdev->blink_delay_off = delay_off; | 48 | led_cdev->blink_delay_off = delay_off; |
56 | 49 | ||