[media] media: video: do not clear 'driver' from an i2c_client
authorWolfram Sang <w.sang@pengutronix.de>
Wed, 10 Nov 2010 14:14:13 +0000 (11:14 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Wed, 29 Dec 2010 10:16:47 +0000 (08:16 -0200)
The i2c-core does this already.

Reported-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Acked-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/video/imx074.c
drivers/media/video/mt9m001.c
drivers/media/video/mt9m111.c
drivers/media/video/mt9t031.c
drivers/media/video/mt9v022.c
drivers/media/video/rj54n1cb0c.c

index 27b5dfdfbb931253fb3f02567084e39ecd97858c..b9c91c1839f8cefc98f429d6e3b2120be188090d 100644 (file)
@@ -467,7 +467,7 @@ static int imx074_remove(struct i2c_client *client)
        icd->ops = NULL;
        if (icl->free_bus)
                icl->free_bus(icl);
-       client->driver = NULL;
+       i2c_set_clientdata(client, NULL);
        kfree(priv);
 
        return 0;
index fcb4cd9418535906a4bb896041f3ba4670842944..f7fc88d240e6e5bf56f3eb9b4fba1e72ecd9bf36 100644 (file)
@@ -798,7 +798,6 @@ static int mt9m001_remove(struct i2c_client *client)
 
        icd->ops = NULL;
        mt9m001_video_remove(icd);
-       client->driver = NULL;
        kfree(mt9m001);
 
        return 0;
index 525a16e73285b16d115e75d6e1e3f9e4d629946f..53fa2a7bf156a862383b84006ee2fd2663606df9 100644 (file)
@@ -1092,7 +1092,6 @@ static int mt9m111_remove(struct i2c_client *client)
        struct soc_camera_device *icd = client->dev.platform_data;
 
        icd->ops = NULL;
-       client->driver = NULL;
        kfree(mt9m111);
 
        return 0;
index 9bd44a816ea17be833fb08e9c7a72bbb39e5844f..7ce279c3751dbd2dd5379c454046473d7b0b775e 100644 (file)
@@ -896,7 +896,6 @@ static int mt9t031_remove(struct i2c_client *client)
 
        if (icd)
                icd->ops = NULL;
-       client->driver = NULL;
        kfree(mt9t031);
 
        return 0;
index b96171cc79f98c9f2d2b673d0f8e06343b9897f4..6a784c87e5ffb1434297b1aa7d589a9f066a84ac 100644 (file)
@@ -930,7 +930,6 @@ static int mt9v022_remove(struct i2c_client *client)
 
        icd->ops = NULL;
        mt9v022_video_remove(icd);
-       client->driver = NULL;
        kfree(mt9v022);
 
        return 0;
index d2fa2d43ff19be92586a4c6e7ed893020d3b5e00..57e11b6f19fbda4a08b915c92434faf9d2ce75c5 100644 (file)
@@ -1460,7 +1460,6 @@ static int rj54n1_remove(struct i2c_client *client)
        icd->ops = NULL;
        if (icl->free_bus)
                icl->free_bus(icl);
-       client->driver = NULL;
        kfree(rj54n1);
 
        return 0;