mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 07:12:09 +00:00
leds: leds-pcs9532 - Move i2c work to a workqueque
Apparently these might be called under atomic context, and i2c operations may sleep. BUG found by Ross Burton <ross@burtonini.com> Signed-off-by: Riku Voipio <riku.voipio@iki.fi> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
This commit is contained in:
parent
f785d022ad
commit
934cd3f979
2 changed files with 45 additions and 8 deletions
|
@ -15,6 +15,7 @@
|
|||
#define __LINUX_PCA9532_H
|
||||
|
||||
#include <linux/leds.h>
|
||||
#include <linux/workqueue.h>
|
||||
|
||||
enum pca9532_state {
|
||||
PCA9532_OFF = 0x0,
|
||||
|
@ -31,6 +32,7 @@ struct pca9532_led {
|
|||
struct i2c_client *client;
|
||||
char *name;
|
||||
struct led_classdev ldev;
|
||||
struct work_struct work;
|
||||
enum pca9532_type type;
|
||||
enum pca9532_state state;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue