public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jean Delvare <khali@linux-fr.org>
To: Greg KH <greg@kroah.com>
Cc: LKML <linux-kernel@vger.kernel.org>,
	LM Sensors <sensors@stimpy.netroedge.com>
Subject: [PATCH 2.6] I2C: Kill i2c_client.id (5/5)
Date: Sun, 16 Jan 2005 20:49:58 +0100	[thread overview]
Message-ID: <20050116204958.1bc0ed5f.khali@linux-fr.org> (raw)
In-Reply-To: <20050116194653.17c96499.khali@linux-fr.org>

> (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.

Thanks.

Signed-off-by: Jean Delvare <khali@linux-fr.org>

diff -ruN linux-2.6.11-rc1.orig/Documentation/i2c/porting-clients linux-2.6.11-rc1/Documentation/i2c/porting-clients
--- linux-2.6.11-rc1.orig/Documentation/i2c/porting-clients	2004-12-24 22:34:27.000000000 +0100
+++ linux-2.6.11-rc1/Documentation/i2c/porting-clients	2005-01-16 18:33:55.000000000 +0100
@@ -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 -ruN linux-2.6.11-rc1.orig/Documentation/i2c/writing-clients linux-2.6.11-rc1/Documentation/i2c/writing-clients
--- linux-2.6.11-rc1.orig/Documentation/i2c/writing-clients	2004-12-24 22:34:26.000000000 +0100
+++ linux-2.6.11-rc1/Documentation/i2c/writing-clients	2005-01-16 12:50:29.000000000 +0100
@@ -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 */
 


-- 
Jean Delvare
http://khali.linux-fr.org/

  parent reply	other threads:[~2005-01-16 19:49 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-01-16 18:46 [PATCH 2.6] I2C: Kill i2c_client.id Jean Delvare
2005-01-16 19:10 ` [PATCH 2.6] I2C: Kill i2c_client.id (1/5) Jean Delvare
2005-01-16 19:27 ` [PATCH 2.6] I2C: Kill i2c_client.id (2/5) Jean Delvare
2005-01-16 19:39 ` [PATCH 2.6] I2C: Kill i2c_client.id (3/5) Jean Delvare
2005-01-16 19:46 ` [PATCH 2.6] I2C: Kill i2c_client.id (4/5) Jean Delvare
2005-01-16 19:49 ` Jean Delvare [this message]
2005-01-19 23:37 ` [PATCH 2.6] I2C: Kill i2c_client.id Greg KH

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050116204958.1bc0ed5f.khali@linux-fr.org \
    --to=khali@linux-fr.org \
    --cc=greg@kroah.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sensors@stimpy.netroedge.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox