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>
This commit is contained in:
parent
859cb7f2a4
commit
ce70a24575
1 changed files with 5 additions and 0 deletions
|
@ -199,6 +199,7 @@ static void timer_trig_activate(struct led_classdev *led_cdev)
|
||||||
static void timer_trig_deactivate(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;
|
struct timer_trig_data *timer_data = led_cdev->trigger_data;
|
||||||
|
unsigned long on = 0, off = 0;
|
||||||
|
|
||||||
if (timer_data) {
|
if (timer_data) {
|
||||||
device_remove_file(led_cdev->dev, &dev_attr_delay_on);
|
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);
|
del_timer_sync(&timer_data->timer);
|
||||||
kfree(timer_data);
|
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 = {
|
static struct led_trigger timer_led_trigger = {
|
||||||
|
|
Loading…
Reference in a new issue