Commit ce70a245 authored by Rodolfo Giometti's avatar Rodolfo Giometti Committed by Richard Purdie

leds: ledtrig-timer - on deactivation hardware blinking should be disabled

Signed-off-by: default avatarRodolfo Giometti <giometti@linux.it>
Signed-off-by: default avatarRichard Purdie <rpurdie@linux.intel.com>
parent 859cb7f2
......@@ -199,6 +199,7 @@ static void timer_trig_activate(struct led_classdev *led_cdev)
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 = {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment