Skip to content

Commit

Permalink
i2c: Remove obsolete cleanup for clientdata
Browse files Browse the repository at this point in the history
A few new i2c-drivers came into the kernel which clear the clientdata-pointer
on exit. This is obsolete meanwhile, so fix it and hope the word will spread.

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
  • Loading branch information
Wolfram Sang authored and Jean Delvare committed Sep 30, 2010
1 parent 4193d91 commit 59bfee6
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 6 deletions.
1 change: 0 additions & 1 deletion drivers/misc/bh1780gli.c
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,6 @@ static int __devexit bh1780_remove(struct i2c_client *client)

ddata = i2c_get_clientdata(client);
sysfs_remove_group(&client->dev.kobj, &bh1780_attr_group);
i2c_set_clientdata(client, NULL);
kfree(ddata);

return 0;
Expand Down
1 change: 0 additions & 1 deletion drivers/regulator/ad5398.c
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,6 @@ static int __devexit ad5398_remove(struct i2c_client *client)

regulator_unregister(chip->rdev);
kfree(chip);
i2c_set_clientdata(client, NULL);

return 0;
}
Expand Down
2 changes: 0 additions & 2 deletions drivers/regulator/isl6271a-regulator.c
Original file line number Diff line number Diff line change
Expand Up @@ -191,8 +191,6 @@ static int __devexit isl6271a_remove(struct i2c_client *i2c)
struct isl_pmic *pmic = i2c_get_clientdata(i2c);
int i;

i2c_set_clientdata(i2c, NULL);

for (i = 0; i < 3; i++)
regulator_unregister(pmic->rdev[i]);

Expand Down
2 changes: 0 additions & 2 deletions drivers/rtc/rtc-ds3232.c
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,6 @@ static int __devinit ds3232_probe(struct i2c_client *client,
free_irq(client->irq, client);

out_free:
i2c_set_clientdata(client, NULL);
kfree(ds3232);
return ret;
}
Expand All @@ -287,7 +286,6 @@ static int __devexit ds3232_remove(struct i2c_client *client)
}

rtc_device_unregister(ds3232->rtc);
i2c_set_clientdata(client, NULL);
kfree(ds3232);
return 0;
}
Expand Down

0 comments on commit 59bfee6

Please sign in to comment.