aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/i2c
diff options
context:
space:
mode:
authorJean Delvare <khali@linux-fr.org>2005-11-26 14:58:35 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2006-01-06 01:16:22 -0500
commitcb748fb20186d4b345c68a7f580429f379fdd268 (patch)
tree6c8f4f0937941bb4ee56ed72ba0b7f60562f1e1d /drivers/i2c
parent5d7b851dcced3611e4a4432308618b1ed1a9fc31 (diff)
[PATCH] i2c: Rework client usage count, 1 of 3
No i2c client uses the I2C_CLIENT_ALLOW_MULTIPLE_USE flag, drop it. Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/i2c')
-rw-r--r--drivers/i2c/i2c-core.c4
1 files changed, 1 insertions, 3 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++;