]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
mfd: Remove unneeded and dangerous clearing of clientdata
authorWolfram Sang <w.sang@pengutronix.de>
Thu, 20 May 2010 22:50:17 +0000 (00:50 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 2 Aug 2010 17:30:13 +0000 (10:30 -0700)
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>
drivers/mfd/88pm860x-i2c.c
drivers/mfd/max8925-i2c.c

index 4a6e7186334e31ce4eccea8b0937312c20b5e29f..e55f3d2c30f213e35f898ce207f4c4e4114d3880 100644 (file)
@@ -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;
index d9fd8785da4d76a78a9e9a95661d1f93c7d46e72..e73f3f5252a89cf138dac35254263ed58630f72c 100644 (file)
@@ -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;