]> err.no Git - linux-2.6/commitdiff
[PATCH] i2c: Rework client usage count, 1 of 3
authorJean Delvare <khali@linux-fr.org>
Sat, 26 Nov 2005 19:58:35 +0000 (20:58 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 6 Jan 2006 06:16:22 +0000 (22:16 -0800)
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>
drivers/i2c/i2c-core.c
include/linux/i2c.h

index ad68ac00d910205b372b8607bc6bb8c11cd4bc6a..2f0bc95293762b4d10a4f9547ec870c75e4d01e4 100644 (file)
@@ -500,9 +500,7 @@ int i2c_use_client(struct i2c_client *client)
                return ret;
 
        if (client->flags & I2C_CLIENT_ALLOW_USE) {
-               if (client->flags & I2C_CLIENT_ALLOW_MULTIPLE_USE)
-                       client->usage_count++;
-               else if (client->usage_count > 0) 
+               if (client->usage_count > 0)
                        goto busy;
                else 
                        client->usage_count++;
index 3c16a8fb95f4459e2e465f20c93cbf24799e5019..4487c51897478f2926b7dbcc8dd79df8e87c1d75 100644 (file)
@@ -251,8 +251,6 @@ static inline void i2c_set_adapdata (struct i2c_adapter *dev, void *data)
 
 /*flags for the client struct: */
 #define I2C_CLIENT_ALLOW_USE           0x01    /* Client allows access */
-#define I2C_CLIENT_ALLOW_MULTIPLE_USE  0x02    /* Allow multiple access-locks */
-                                               /* on an i2c_client */
 #define I2C_CLIENT_PEC  0x04                   /* Use Packet Error Checking */
 #define I2C_CLIENT_TEN 0x10                    /* we have a ten bit chip address       */
                                                /* Must equal I2C_M_TEN below */