summaryrefslogtreecommitdiffstats
path: root/drivers/leds
diff options
context:
space:
mode:
authorRodolfo Giometti <giometti@linux.it>2009-01-08 20:50:15 +0100
committerRichard Purdie <rpurdie@linux.intel.com>2009-01-08 21:58:01 +0100
commitce70a24575414d615f6a7a05caf9b7e8f91a1b6f (patch)
tree36d37b55e8a01534f8366ebda8d9747edb283516 /drivers/leds
parentleds: Add suspend/resume to the core class (diff)
downloadlinux-ce70a24575414d615f6a7a05caf9b7e8f91a1b6f.tar.xz
linux-ce70a24575414d615f6a7a05caf9b7e8f91a1b6f.zip
leds: ledtrig-timer - on deactivation hardware blinking should be disabled
Signed-off-by: Rodolfo Giometti <giometti@linux.it> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'drivers/leds')
-rw-r--r--drivers/leds/ledtrig-timer.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/leds/ledtrig-timer.c b/drivers/leds/ledtrig-timer.c
index db681962d7bb..3d6531396dda 100644
--- a/drivers/leds/ledtrig-timer.c
+++ b/drivers/leds/ledtrig-timer.c
@@ -199,6 +199,7 @@ err_out:
static void timer_trig_deactivate(struct led_classdev *led_cdev)
{
struct timer_trig_data *timer_data = led_cdev->trigger_data;
+ unsigned long on = 0, off = 0;
if (timer_data) {
device_remove_file(led_cdev->dev, &dev_attr_delay_on);
@@ -206,6 +207,10 @@ static void timer_trig_deactivate(struct led_classdev *led_cdev)
del_timer_sync(&timer_data->timer);
kfree(timer_data);
}
+
+ /* If there is hardware support for blinking, stop it */
+ if (led_cdev->blink_set)
+ led_cdev->blink_set(led_cdev, &on, &off);
}
static struct led_trigger timer_led_trigger = {