Commit e02de9bc authored by Jean Delvare's avatar Jean Delvare Committed by Greg Kroah-Hartman

[PATCH] I2C: Kill i2c_client.id (5/5)

> (5/5) Documentation update.

Finally, updates are required to the i2c/writing-client and
i2c/porting-client documents. Remove any reference to i2c_client id and
invite porters to discard that struct member.
Signed-off-by: default avatarJean Delvare <khali@linux-fr.org>
Signed-off-by: default avatarGreg Kroah-Hartman <greg@kroah.com>
parent 5e49e9e8
......@@ -49,9 +49,8 @@ Technical changes:
static void lm75_update_client(struct i2c_client *client);
* [Sysctl] All sysctl stuff is of course gone (defines, ctl_table
and functions). Instead, right after the static id definition
line, you have to define show and set functions for each sysfs
file. Only define set for writable values. Take a look at an
and functions). Instead, you have to define show and set functions for
each sysfs file. Only define set for writable values. Take a look at an
existing 2.6 driver for details (lm78 for example). Don't forget
to define the attributes for each file (this is that step that
links callback functions). Use the file names specified in
......@@ -86,6 +85,7 @@ Technical changes:
Replace the sysctl directory registration by calls to
device_create_file. Move the driver initialization before any
sysfs file creation.
Drop client->id.
* [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
......
......@@ -344,9 +344,6 @@ detection just fails for this address, return 0.
For now, you can ignore the `flags' parameter. It is there for future use.
/* Unique ID allocation */
static int foo_id = 0;
int foo_detect_client(struct i2c_adapter *adapter, int address,
unsigned short flags, int kind)
{
......@@ -482,7 +479,6 @@ For now, you can ignore the `flags' parameter. It is there for future use.
data->type = kind;
/* SENSORS ONLY END */
new_client->id = foo_id++; /* Automatically unique */
data->valid = 0; /* Only if you use this field */
init_MUTEX(&data->update_lock); /* Only if you use this field */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment