i2c-core: Use per-adapter userspace device lists

Using a single list for all userspace devices leads to a dead lock
on multiplexed buses in some circumstances (mux chip instantiated
from userspace). This is solved by using a separate list for each
bus segment.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Michael Lawnick <ml.lawnick@gmx.de>
This commit is contained in:
Jean Delvare
2010-05-04 11:09:28 +02:00
parent b1d4b390ea
commit 6629dcff19
2 changed files with 20 additions and 16 deletions

View File

@@ -355,6 +355,8 @@ struct i2c_adapter {
int nr;
char name[48];
struct completion dev_released;
struct list_head userspace_clients;
};
#define to_i2c_adapter(d) container_of(d, struct i2c_adapter, dev)