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: Alan Cox <alan@linux.intel.com>
Acked-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
  • Loading branch information
Wolfram Sang authored and Jean Delvare committed Nov 15, 2010
1 parent 0143832 commit dc6641b
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 8 deletions.
2 changes: 0 additions & 2 deletions drivers/media/video/imx074.c
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,6 @@ static int imx074_probe(struct i2c_client *client,
ret = imx074_video_probe(icd, client);
if (ret < 0) {
icd->ops = NULL;
i2c_set_clientdata(client, NULL);
kfree(priv);
return ret;
}
Expand All @@ -468,7 +467,6 @@ static int imx074_remove(struct i2c_client *client)
icd->ops = NULL;
if (icl->free_bus)
icl->free_bus(icl);
i2c_set_clientdata(client, NULL);
client->driver = NULL;
kfree(priv);

Expand Down
2 changes: 0 additions & 2 deletions drivers/media/video/ov6650.c
Original file line number Diff line number Diff line change
Expand Up @@ -1174,7 +1174,6 @@ static int ov6650_probe(struct i2c_client *client,

if (ret) {
icd->ops = NULL;
i2c_set_clientdata(client, NULL);
kfree(priv);
}

Expand All @@ -1185,7 +1184,6 @@ static int ov6650_remove(struct i2c_client *client)
{
struct ov6650 *priv = to_ov6650(client);

i2c_set_clientdata(client, NULL);
kfree(priv);
return 0;
}
Expand Down
1 change: 0 additions & 1 deletion drivers/misc/apds9802als.c
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,6 @@ static int apds9802als_probe(struct i2c_client *client,

return res;
als_error1:
i2c_set_clientdata(client, NULL);
kfree(data);
return res;
}
Expand Down
3 changes: 0 additions & 3 deletions drivers/staging/olpc_dcon/olpc_dcon.c
Original file line number Diff line number Diff line change
Expand Up @@ -733,7 +733,6 @@ static int dcon_probe(struct i2c_client *client, const struct i2c_device_id *id)
edev:
platform_device_unregister(dcon_device);
dcon_device = NULL;
i2c_set_clientdata(client, NULL);
eirq:
free_irq(DCON_IRQ, &dcon_driver);
einit:
Expand All @@ -757,8 +756,6 @@ static int dcon_remove(struct i2c_client *client)
platform_device_unregister(dcon_device);
cancel_work_sync(&dcon_work);

i2c_set_clientdata(client, NULL);

return 0;
}

Expand Down

0 comments on commit dc6641b

Please sign in to comment.