leds: convert blink timer to workqueue
This patch converts the blink timer from led-core to workqueue which is more suitable for this kind of non-priority operations. Moreover, timer may lead to errors when a LED setting function use a scheduling function such as pinctrl which is using mutex. Signed-off-by: Vincent Donnefort <vdonnefort@gmail.com> Signed-off-by: Bryan Wu <cooloney@gmail.com>
This commit is contained in:

committed by
Bryan Wu

parent
7e7743901b
commit
8b37e1bef5
@@ -15,7 +15,6 @@
|
||||
#include <linux/list.h>
|
||||
#include <linux/spinlock.h>
|
||||
#include <linux/rwsem.h>
|
||||
#include <linux/timer.h>
|
||||
#include <linux/workqueue.h>
|
||||
|
||||
struct device;
|
||||
@@ -69,7 +68,7 @@ struct led_classdev {
|
||||
const char *default_trigger; /* Trigger to use */
|
||||
|
||||
unsigned long blink_delay_on, blink_delay_off;
|
||||
struct timer_list blink_timer;
|
||||
struct delayed_work blink_work;
|
||||
int blink_brightness;
|
||||
|
||||
struct work_struct set_brightness_work;
|
||||
|
Reference in New Issue
Block a user