i2c: Remove all i2c_set_clientdata(client, NULL) in drivers
authorWolfram Sang <w.sang@pengutronix.de>
Thu, 3 Jun 2010 09:33:58 +0000 (11:33 +0200)
committerJean Delvare <khali@linux-fr.org>
Thu, 3 Jun 2010 09:33:58 +0000 (11:33 +0200)
commitfbae3fb1546e199ab0cd185348f8124411a1ca9d
tree928881dc419348268cbc8208a41fe0d038035114
parent35bfc353dcaecc99c277e3646564f3f785760bde
i2c: Remove all i2c_set_clientdata(client, NULL) in drivers

I2C drivers can use the clientdata-pointer to point to private data. As I2C
devices are not really unregistered, but merely detached from their driver, it
used to be the drivers obligation to clear this pointer during remove() or a
failed probe(). As a couple of drivers forgot to do this, it was agreed that it
was cleaner if the i2c-core does this clearance when appropriate, as there is
no guarantee for the lifetime of the clientdata-pointer after remove() anyhow.
This feature was added to the core with commit
e4a7b9b04de15f6b63da5ccdd373ffa3057a3681 to fix the faulty drivers.

As there is no need anymore to clear the clientdata-pointer, remove all current
occurrences in the drivers to simplify the code and prevent confusion.

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
Acked-by: Richard Purdie <rpurdie@linux.intel.com>
Acked-by: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
75 files changed:
drivers/hwmon/adt7411.c
drivers/hwmon/asc7621.c
drivers/hwmon/f75375s.c
drivers/hwmon/g760a.c
drivers/hwmon/lm73.c
drivers/hwmon/lm75.c
drivers/hwmon/lm95241.c
drivers/hwmon/tmp102.c
drivers/hwmon/tmp421.c
drivers/hwmon/w83781d.c
drivers/i2c/i2c-smbus.c
drivers/input/keyboard/adp5588-keys.c
drivers/input/keyboard/lm8323.c
drivers/input/keyboard/max7359_keypad.c
drivers/input/keyboard/qt2160.c
drivers/input/keyboard/tca6416-keypad.c
drivers/input/misc/ad714x-i2c.c
drivers/input/misc/pcf8574_keypad.c
drivers/input/mouse/synaptics_i2c.c
drivers/input/touchscreen/ad7879.c
drivers/input/touchscreen/eeti_ts.c
drivers/input/touchscreen/mcs5000_ts.c
drivers/input/touchscreen/tsc2007.c
drivers/leds/leds-bd2802.c
drivers/leds/leds-lp3944.c
drivers/leds/leds-pca9532.c
drivers/leds/leds-pca955x.c
drivers/macintosh/therm_adt746x.c
drivers/macintosh/windfarm_lm75_sensor.c
drivers/macintosh/windfarm_max6690_sensor.c
drivers/macintosh/windfarm_smu_sat.c
drivers/media/radio/si470x/radio-si470x-i2c.c
drivers/media/video/mt9m001.c
drivers/media/video/mt9m111.c
drivers/media/video/mt9t031.c
drivers/media/video/mt9t112.c
drivers/media/video/mt9v022.c
drivers/media/video/ov772x.c
drivers/media/video/ov9640.c
drivers/media/video/rj54n1cb0c.c
drivers/media/video/tcm825x.c
drivers/media/video/tw9910.c
drivers/mfd/88pm860x-i2c.c
drivers/mfd/ab3100-core.c
drivers/mfd/ab3550-core.c
drivers/mfd/adp5520.c
drivers/mfd/da903x.c
drivers/mfd/max8925-i2c.c
drivers/mfd/menelaus.c
drivers/mfd/pcf50633-core.c
drivers/mfd/tc35892.c
drivers/mfd/tps65010.c
drivers/mfd/wm8350-i2c.c
drivers/mfd/wm8400-core.c
drivers/misc/eeprom/at24.c
drivers/mtd/maps/pismo.c
drivers/power/max17040_battery.c
drivers/regulator/lp3971.c
drivers/regulator/max1586.c
drivers/regulator/max8649.c
drivers/regulator/max8660.c
drivers/regulator/tps65023-regulator.c
drivers/rtc/rtc-ds1374.c
drivers/rtc/rtc-rx8025.c
drivers/rtc/rtc-s35390a.c
drivers/staging/dream/synaptics_i2c_rmi.c
drivers/staging/go7007/wis-saa7113.c
drivers/staging/go7007/wis-saa7115.c
drivers/staging/go7007/wis-sony-tuner.c
drivers/staging/go7007/wis-tw2804.c
drivers/staging/go7007/wis-tw9903.c
drivers/staging/iio/adc/max1363_core.c
drivers/staging/iio/light/tsl2563.c
drivers/video/backlight/adp8860_bl.c
drivers/video/backlight/tosa_bl.c