media: marvell-ccic: drop resource free in driver remove

Message ID 1383621668.10562.5.camel@younglee-desktop (mailing list archive)
State Accepted, archived
Delegated to: Hans Verkuil
Headers

Commit Message

Libin Yang Nov. 5, 2013, 3:21 a.m. UTC
  From: Libin Yang <lbyang@marvell.com>
Date: Tue, 5 Nov 2013 10:18:15 +0800
Subject: [PATCH] marvell-ccic: drop resource free in driver remove

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>
---
 drivers/media/platform/marvell-ccic/mmp-driver.c |    7 -------
 1 file changed, 7 deletions(-)
  

Comments

Jonathan Corbet Nov. 5, 2013, 4:07 p.m. UTC | #1
On Tue, 5 Nov 2013 11:21:08 +0800
lbyang <lbyang@marvell.com> wrote:

> From: Libin Yang <lbyang@marvell.com>
> Date: Tue, 5 Nov 2013 10:18:15 +0800
> Subject: [PATCH] marvell-ccic: drop resource free in driver remove
> 
> The mmp-driver is using devm_* to allocate the resource. The old
> resource release methods are not appropriate here.

Acked-by: Jonathan Corbet <corbet@lwn.net>

jon
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
  

Patch

diff --git a/drivers/media/platform/marvell-ccic/mmp-driver.c
b/drivers/media/platform/marvell-ccic/mmp-driver.c
index 3458fa0..70cb57f 100644
--- a/drivers/media/platform/marvell-ccic/mmp-driver.c
+++ b/drivers/media/platform/marvell-ccic/mmp-driver.c
@@ -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;
 }