diff options
author | Wolfram Sang <w.sang@pengutronix.de> | 2010-05-20 18:50:17 -0400 |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2010-05-27 19:38:01 -0400 |
commit | 28ade0f217a3a3ff992b01e06e6e425c250a8406 (patch) | |
tree | 1469b01ab8bda499a2782bc67457e5258dd5d5f1 /drivers | |
parent | 62579266cf9caca5b999560be2b5ceee42fc4d4d (diff) |
mfd: Remove unneeded and dangerous clearing of clientdata
Unlike real i2c-devices which get detached from the driver, dummy-devices
get truly unregistered. So, there has never been a need to clear the
clientdata because the device will go away anyhow. For the occasions fixed
here, clearing clientdata was even dangerous as the structure was freed
already.
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Acked-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/mfd/88pm860x-i2c.c | 1 | ||||
-rw-r--r-- | drivers/mfd/max8925-i2c.c | 2 |
2 files changed, 0 insertions, 3 deletions
diff --git a/drivers/mfd/88pm860x-i2c.c b/drivers/mfd/88pm860x-i2c.c index b0bade1881d4..c933b64d1283 100644 --- a/drivers/mfd/88pm860x-i2c.c +++ b/drivers/mfd/88pm860x-i2c.c | |||
@@ -200,7 +200,6 @@ static int __devexit pm860x_remove(struct i2c_client *client) | |||
200 | 200 | ||
201 | pm860x_device_exit(chip); | 201 | pm860x_device_exit(chip); |
202 | i2c_unregister_device(chip->companion); | 202 | i2c_unregister_device(chip->companion); |
203 | i2c_set_clientdata(chip->companion, NULL); | ||
204 | i2c_set_clientdata(chip->client, NULL); | 203 | i2c_set_clientdata(chip->client, NULL); |
205 | i2c_set_clientdata(client, NULL); | 204 | i2c_set_clientdata(client, NULL); |
206 | kfree(chip); | 205 | kfree(chip); |
diff --git a/drivers/mfd/max8925-i2c.c b/drivers/mfd/max8925-i2c.c index d9fd8785da4d..e73f3f5252a8 100644 --- a/drivers/mfd/max8925-i2c.c +++ b/drivers/mfd/max8925-i2c.c | |||
@@ -173,8 +173,6 @@ static int __devexit max8925_remove(struct i2c_client *client) | |||
173 | max8925_device_exit(chip); | 173 | max8925_device_exit(chip); |
174 | i2c_unregister_device(chip->adc); | 174 | i2c_unregister_device(chip->adc); |
175 | i2c_unregister_device(chip->rtc); | 175 | i2c_unregister_device(chip->rtc); |
176 | i2c_set_clientdata(chip->adc, NULL); | ||
177 | i2c_set_clientdata(chip->rtc, NULL); | ||
178 | i2c_set_clientdata(chip->i2c, NULL); | 176 | i2c_set_clientdata(chip->i2c, NULL); |
179 | kfree(chip); | 177 | kfree(chip); |
180 | return 0; | 178 | return 0; |