diff options
-rw-r--r-- | drivers/i2c/i2c-core.c | 4 | ||||
-rw-r--r-- | include/linux/i2c.h | 2 |
2 files changed, 1 insertions, 5 deletions
diff --git a/drivers/i2c/i2c-core.c b/drivers/i2c/i2c-core.c index ad68ac00d910..2f0bc9529376 100644 --- a/drivers/i2c/i2c-core.c +++ b/drivers/i2c/i2c-core.c | |||
@@ -500,9 +500,7 @@ int i2c_use_client(struct i2c_client *client) | |||
500 | return ret; | 500 | return ret; |
501 | 501 | ||
502 | if (client->flags & I2C_CLIENT_ALLOW_USE) { | 502 | if (client->flags & I2C_CLIENT_ALLOW_USE) { |
503 | if (client->flags & I2C_CLIENT_ALLOW_MULTIPLE_USE) | 503 | if (client->usage_count > 0) |
504 | client->usage_count++; | ||
505 | else if (client->usage_count > 0) | ||
506 | goto busy; | 504 | goto busy; |
507 | else | 505 | else |
508 | client->usage_count++; | 506 | client->usage_count++; |
diff --git a/include/linux/i2c.h b/include/linux/i2c.h index 3c16a8fb95f4..4487c5189747 100644 --- a/include/linux/i2c.h +++ b/include/linux/i2c.h | |||
@@ -251,8 +251,6 @@ static inline void i2c_set_adapdata (struct i2c_adapter *dev, void *data) | |||
251 | 251 | ||
252 | /*flags for the client struct: */ | 252 | /*flags for the client struct: */ |
253 | #define I2C_CLIENT_ALLOW_USE 0x01 /* Client allows access */ | 253 | #define I2C_CLIENT_ALLOW_USE 0x01 /* Client allows access */ |
254 | #define I2C_CLIENT_ALLOW_MULTIPLE_USE 0x02 /* Allow multiple access-locks */ | ||
255 | /* on an i2c_client */ | ||
256 | #define I2C_CLIENT_PEC 0x04 /* Use Packet Error Checking */ | 254 | #define I2C_CLIENT_PEC 0x04 /* Use Packet Error Checking */ |
257 | #define I2C_CLIENT_TEN 0x10 /* we have a ten bit chip address */ | 255 | #define I2C_CLIENT_TEN 0x10 /* we have a ten bit chip address */ |
258 | /* Must equal I2C_M_TEN below */ | 256 | /* Must equal I2C_M_TEN below */ |