Commit 28ade0f2 authored by Wolfram Sang's avatar Wolfram Sang Committed by Samuel Ortiz

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: default avatarWolfram Sang <w.sang@pengutronix.de>
Acked-by: default avatarJean Delvare <khali@linux-fr.org>
Signed-off-by: default avatarSamuel Ortiz <sameo@linux.intel.com>
parent 62579266
...@@ -200,7 +200,6 @@ static int __devexit pm860x_remove(struct i2c_client *client) ...@@ -200,7 +200,6 @@ static int __devexit pm860x_remove(struct i2c_client *client)
pm860x_device_exit(chip); pm860x_device_exit(chip);
i2c_unregister_device(chip->companion); i2c_unregister_device(chip->companion);
i2c_set_clientdata(chip->companion, NULL);
i2c_set_clientdata(chip->client, NULL); i2c_set_clientdata(chip->client, NULL);
i2c_set_clientdata(client, NULL); i2c_set_clientdata(client, NULL);
kfree(chip); kfree(chip);
......
...@@ -173,8 +173,6 @@ static int __devexit max8925_remove(struct i2c_client *client) ...@@ -173,8 +173,6 @@ static int __devexit max8925_remove(struct i2c_client *client)
max8925_device_exit(chip); max8925_device_exit(chip);
i2c_unregister_device(chip->adc); i2c_unregister_device(chip->adc);
i2c_unregister_device(chip->rtc); i2c_unregister_device(chip->rtc);
i2c_set_clientdata(chip->adc, NULL);
i2c_set_clientdata(chip->rtc, NULL);
i2c_set_clientdata(chip->i2c, NULL); i2c_set_clientdata(chip->i2c, NULL);
kfree(chip); kfree(chip);
return 0; return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment