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:

committed by
Richard Purdie

parent
f785d022ad
commit
934cd3f979
@@ -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;
|
||||
};
|
||||
|
Reference in New Issue
Block a user