aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorJean Delvare <khali@linux-fr.org>2005-11-26 15:03:41 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2006-01-06 01:16:22 -0500
commitcf02df770228350254251fde520007a2709db785 (patch)
treeef10929d0160ebf27f29bac2a9e285b267a63331 /drivers
parentcde7859bda0d1124392b44e50aa11df99707e1d9 (diff)
[PATCH] i2c: Rework client usage count, 3 of 3
Do not limit the usage count of i2c clients to 1. In other words, change the client usage count behavior from the old I2C_CLIENT_ALLOW_USE to the old I2C_CLIENT_ALLOW_MULTIPLE_USE. The rationale is that no driver actually needs the limiting behavior, and the unlimiting behavior is slightly easier to implement. Update the documentation to reflect this change. Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/i2c/i2c-core.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/drivers/i2c/i2c-core.c b/drivers/i2c/i2c-core.c
index d16b4998c4c2..a1c5dff85431 100644
--- a/drivers/i2c/i2c-core.c
+++ b/drivers/i2c/i2c-core.c
@@ -497,14 +497,9 @@ int i2c_use_client(struct i2c_client *client)
497 if (ret) 497 if (ret)
498 return ret; 498 return ret;
499 499
500 if (client->usage_count > 0)
501 goto busy;
502 client->usage_count++; 500 client->usage_count++;
503 501
504 return 0; 502 return 0;
505 busy:
506 i2c_dec_use_client(client);
507 return -EBUSY;
508} 503}
509 504
510int i2c_release_client(struct i2c_client *client) 505int i2c_release_client(struct i2c_client *client)