Skip to content

Commit

Permalink
leds: don't disable blinking when writing the same value to delay_on …
Browse files Browse the repository at this point in the history
…or delay_off

Function led_set_software_blink() assumes that blink timer is still running,
but commit 488bc35 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>
  • Loading branch information
Rafal Prylowski authored and Bryan Wu committed Jun 12, 2012
1 parent cfaf025 commit 3fbd871
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions drivers/leds/led-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,6 @@ static void led_set_software_blink(struct led_classdev *led_cdev,
if (!led_cdev->blink_brightness)
led_cdev->blink_brightness = led_cdev->max_brightness;

if (led_get_trigger_data(led_cdev) &&
delay_on == led_cdev->blink_delay_on &&
delay_off == led_cdev->blink_delay_off)
return;

led_stop_software_blink(led_cdev);

led_cdev->blink_delay_on = delay_on;
led_cdev->blink_delay_off = delay_off;

Expand Down

0 comments on commit 3fbd871

Please sign in to comment.