aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/i2c.h
diff options
context:
space:
mode:
authorJean Delvare <khali@linux-fr.org>2010-08-11 18:21:01 +0200
committerJean Delvare <khali@linux-fr.org>2010-08-11 18:21:01 +0200
commitdafc50d141c27959dbd3a1cfe9857a86d23402a7 (patch)
tree565aea94308f40813540f06d7bbcb322ae92eeed /include/linux/i2c.h
parenti2c: Make i2c_default_probe self-sufficient (diff)
downloadlinux-dev-dafc50d141c27959dbd3a1cfe9857a86d23402a7.tar.xz
linux-dev-dafc50d141c27959dbd3a1cfe9857a86d23402a7.zip
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>
Diffstat (limited to 'include/linux/i2c.h')
-rw-r--r--include/linux/i2c.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/i2c.h b/include/linux/i2c.h
index 5bf0f4beea31..798bad8741e4 100644
--- a/include/linux/i2c.h
+++ b/include/linux/i2c.h
@@ -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)