lkml.org 
[lkml]   [2005]   [Mar]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[PATCH] I2C: Kill i2c_client.id (5/5)
Date
From
ChangeSet 1.2087, 2005/03/02 11:58:29-08:00, khali@linux-fr.org

[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: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>


Documentation/i2c/porting-clients | 6 +++---
Documentation/i2c/writing-clients | 4 ----
2 files changed, 3 insertions(+), 7 deletions(-)


diff -Nru a/Documentation/i2c/porting-clients b/Documentation/i2c/porting-clients
--- a/Documentation/i2c/porting-clients 2005-03-04 12:25:58 -08:00
+++ b/Documentation/i2c/porting-clients 2005-03-04 12:25:58 -08:00
@@ -49,9 +49,8 @@
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 @@
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
diff -Nru a/Documentation/i2c/writing-clients b/Documentation/i2c/writing-clients
--- a/Documentation/i2c/writing-clients 2005-03-04 12:25:58 -08:00
+++ b/Documentation/i2c/writing-clients 2005-03-04 12:25:58 -08:00
@@ -344,9 +344,6 @@

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 @@
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 */

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:10    [W:0.087 / U:0.196 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site