summaryrefslogtreecommitdiffstats
path: root/Documentation
diff options
context:
space:
mode:
authorWolfram Sang <w.sang@pengutronix.de>2010-05-04 11:09:27 +0200
committerJean Delvare <khali@linux-fr.org>2010-05-04 11:09:27 +0200
commite4a7b9b04de15f6b63da5ccdd373ffa3057a3681 (patch)
tree7f2f49df9dc66b334b85f83347df03d2b0d0a721 /Documentation
parentd93ac51c7a129db7a1431d859a3ef45a0b1f3fc5 (diff)
downloadlinux-e4a7b9b04de15f6b63da5ccdd373ffa3057a3681.tar.bz2
i2c-core: Erase pointer to clientdata on removal
After discovering that a lot of i2c-drivers leave the pointer to their clientdata dangling, it was decided to let the core handle this issue. It is assumed that the core may access the private data after remove() as there are no guarantees for the lifetime of such pointers anyhow (see thread starting at http://lkml.org/lkml/2010/3/21/68) Signed-off-by: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: Jean Delvare <khali@linux-fr.org>
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/i2c/writing-clients5
1 files changed, 5 insertions, 0 deletions
diff --git a/Documentation/i2c/writing-clients b/Documentation/i2c/writing-clients
index 3219ee0dbfef..5ebf5af1d716 100644
--- a/Documentation/i2c/writing-clients
+++ b/Documentation/i2c/writing-clients
@@ -74,6 +74,11 @@ structure at all. You should use this to keep device-specific data.
/* retrieve the value */
void *i2c_get_clientdata(const struct i2c_client *client);
+Note that starting with kernel 2.6.34, you don't have to set the `data' field
+to NULL in remove() or if probe() failed anymore. The i2c-core does this
+automatically on these occasions. Those are also the only times the core will
+touch this field.
+
Accessing the client
====================