[media] marvell-ccic: drop resource free in driver remove
authorLibin Yang <lbyang@marvell.com>
Tue, 5 Nov 2013 02:18:15 +0000 (23:18 -0300)
committerMauro Carvalho Chehab <m.chehab@samsung.com>
Fri, 29 Nov 2013 16:46:07 +0000 (14:46 -0200)
The mmp-driver is using devm_* to allocate the resource. The old
resource release methods are not appropriate here.

Signed-off-by: Libin Yang <lbyang@marvell.com>
Acked-by: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Cc: stable@vger.kernel.org # for v3.12 and up
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
drivers/media/platform/marvell-ccic/mmp-driver.c

index 3458fa0e2fd537916270fd9fbb0908d2b1610821..70cb57f3adc263291c9ac1d977c55862eec92e97 100644 (file)
@@ -478,18 +478,11 @@ out_deinit_clk:
 static int mmpcam_remove(struct mmp_camera *cam)
 {
        struct mcam_camera *mcam = &cam->mcam;
-       struct mmp_camera_platform_data *pdata;
 
        mmpcam_remove_device(cam);
        mccic_shutdown(mcam);
        mmpcam_power_down(mcam);
-       pdata = cam->pdev->dev.platform_data;
-       gpio_free(pdata->sensor_reset_gpio);
-       gpio_free(pdata->sensor_power_gpio);
        mcam_deinit_clk(mcam);
-       iounmap(cam->power_regs);
-       iounmap(mcam->regs);
-       kfree(cam);
        return 0;
 }