i2c: Use a separate mutex for userspace client lists

Moving userspace-instantiated clients to separate lists wasn't nearly
enough to avoid deadlocks in multiplexed bus cases. We also want to
have a dedicated mutex to protect each list.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Michael Lawnick <ml.lawnick@gmx.de>
This commit is contained in:
Jean Delvare
2010-08-11 18:21:01 +02:00
parent 8031d79bae
commit dafc50d141
2 changed files with 8 additions and 6 deletions

View File

@ -368,6 +368,7 @@ struct i2c_adapter {
char name[48];
struct completion dev_released;
struct mutex userspace_clients_lock;
struct list_head userspace_clients;
};
#define to_i2c_adapter(d) container_of(d, struct i2c_adapter, dev)