Skip to content

Commit

Permalink
mfd: Remove unneeded and dangerous clearing of clientdata
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Wolfram Sang authored and Samuel Ortiz committed May 27, 2010
1 parent 6257926 commit 28ade0f
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 3 deletions.
1 change: 0 additions & 1 deletion drivers/mfd/88pm860x-i2c.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
i2c_set_clientdata(client, NULL);
kfree(chip);
Expand Down
2 changes: 0 additions & 2 deletions drivers/mfd/max8925-i2c.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 28ade0f

Please sign in to comment.