Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 16685
b: refs/heads/master
c: cf02df7
h: refs/heads/master
i:
  16683: 7d878c1
v: v3
  • Loading branch information
Jean Delvare authored and Greg Kroah-Hartman committed Jan 6, 2006
1 parent 56ee756 commit d647ccb
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: cde7859bda0d1124392b44e50aa11df99707e1d9
refs/heads/master: cf02df770228350254251fde520007a2709db785
1 change: 1 addition & 0 deletions trunk/Documentation/i2c/porting-clients
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ Technical changes:
Drop client->id.
Drop any 24RF08 corruption prevention you find, as this is now done
at the i2c-core level, and doing it twice voids it.
Don't add I2C_CLIENT_ALLOW_USE to client->flags, it's the default now.

* [Init] Limits must not be set by the driver (can be done later in
user-space). Chip should not be reset default (although a module
Expand Down
5 changes: 0 additions & 5 deletions trunk/drivers/i2c/i2c-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -497,14 +497,9 @@ int i2c_use_client(struct i2c_client *client)
if (ret)
return ret;

if (client->usage_count > 0)
goto busy;
client->usage_count++;

return 0;
busy:
i2c_dec_use_client(client);
return -EBUSY;
}

int i2c_release_client(struct i2c_client *client)
Expand Down
4 changes: 1 addition & 3 deletions trunk/include/linux/i2c.h
Original file line number Diff line number Diff line change
Expand Up @@ -307,9 +307,7 @@ extern struct i2c_client *i2c_get_client(int driver_id, int adapter_id,
extern struct i2c_client *i2c_get_client(int,int,struct i2c_client *);
to make sure that client-struct is valid and that it is okay to access
the i2c-client.
returns -EACCES if client doesn't allow use (default)
returns -EBUSY if client doesn't allow multiple use (default) and
usage_count >0 */
returns -ENODEV if client has gone in the meantime */
extern int i2c_use_client(struct i2c_client *);
extern int i2c_release_client(struct i2c_client *);

Expand Down

0 comments on commit d647ccb

Please sign in to comment.