summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWolfram Sang <w.sang@pengutronix.de>2010-05-21 00:50:17 +0200
committerGreg Kroah-Hartman <gregkh@suse.de>2010-08-02 10:30:13 -0700
commit906846b7acfbdc0d31ae83b2a011ecbc5ba46786 (patch)
tree23447c4500ed3143d55d63c64260a4b7688081e9
parent3589bef7c2755ab044274f7cdea656bba29a94ae (diff)
mfd: Remove unneeded and dangerous clearing of clientdata
commit 28ade0f217a3a3ff992b01e06e6e425c250a8406 upstream. 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> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r--drivers/mfd/88pm860x-i2c.c1
-rw-r--r--drivers/mfd/max8925-i2c.c2
2 files changed, 0 insertions, 3 deletions
diff --git a/drivers/mfd/88pm860x-i2c.c b/drivers/mfd/88pm860x-i2c.c
index 4a6e7186334e..e55f3d2c30f2 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)
pm860x_device_exit(chip);
i2c_unregister_device(chip->companion);
- i2c_set_clientdata(chip->companion, NULL);
i2c_set_clientdata(chip->client, NULL);
kfree(chip);
return 0;
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)
max8925_device_exit(chip);
i2c_unregister_device(chip->adc);
i2c_unregister_device(chip->rtc);
- i2c_set_clientdata(chip->adc, NULL);
- i2c_set_clientdata(chip->rtc, NULL);
i2c_set_clientdata(chip->i2c, NULL);
kfree(chip);
return 0;