Commit 2ec18910 authored by Christoph Hellwig's avatar Christoph Hellwig

[PATCH] i2c-core locking updates

The old adap_lock and driver_lock could deadlock and there was a bunch
of stuff that was horribly racy.  The new locking scheme is from
lm_sensors CVS but I had to fix quite a few bugs to make this work.
parent a712ff9f
This diff is collapsed.
...@@ -220,11 +220,11 @@ struct i2c_adapter { ...@@ -220,11 +220,11 @@ struct i2c_adapter {
/* and can be set via the i2c_ioctl call */ /* and can be set via the i2c_ioctl call */
/* data fields that are valid for all devices */ /* data fields that are valid for all devices */
struct semaphore lock; struct semaphore bus;
struct semaphore list;
unsigned int flags;/* flags specifying div. data */ unsigned int flags;/* flags specifying div. data */
struct i2c_client *clients[I2C_CLIENT_MAX]; struct i2c_client *clients[I2C_CLIENT_MAX];
int client_count;
int timeout; int timeout;
int retries; int retries;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment