mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-22 23:04:43 +00:00
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:
parent
7e7743901b
commit
8b37e1bef5
3 changed files with 14 additions and 14 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue