mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-24 20:54:10 +08:00
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
@ -199,6 +199,7 @@ err_out:
|
|||||||
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 New Issue
Block a user