summaryrefslogtreecommitdiffstats
path: root/drivers/media/video/omap3isp/ispccp2.c
diff options
context:
space:
mode:
authorLaurent Pinchart2011-09-22 21:54:34 +0200
committerMauro Carvalho Chehab2011-11-03 21:29:15 +0100
commit63b4ca23ed2b35742bebf8cb2af49b84b24442c6 (patch)
tree19bcdc500eabdab107a570916cdc890cd3e39b29 /drivers/media/video/omap3isp/ispccp2.c
parent[media] MFC: Change MFC firmware binary name (diff)
downloadkernel-qcow2-linux-63b4ca23ed2b35742bebf8cb2af49b84b24442c6.tar.gz
kernel-qcow2-linux-63b4ca23ed2b35742bebf8cb2af49b84b24442c6.tar.xz
kernel-qcow2-linux-63b4ca23ed2b35742bebf8cb2af49b84b24442c6.zip
[media] omap3isp: Move media_entity_cleanup() from unregister() to cleanup()
The media_entity_cleanup() function belong to the module cleanup handlers, not the entity registration handlers. Move it there. Create a omap3isp_video_cleanup() function to cleanup the video node entity, and call it from the module cleanup handlers. Rename omap3isp_stat_free() to omap3isp_stat_cleanup(). Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/omap3isp/ispccp2.c')
-rw-r--r--drivers/media/video/omap3isp/ispccp2.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/media/video/omap3isp/ispccp2.c b/drivers/media/video/omap3isp/ispccp2.c
index fa1d09b0ad98..b8e0863b194c 100644
--- a/drivers/media/video/omap3isp/ispccp2.c
+++ b/drivers/media/video/omap3isp/ispccp2.c
@@ -1100,8 +1100,6 @@ static int ccp2_init_entities(struct isp_ccp2_device *ccp2)
*/
void omap3isp_ccp2_unregister_entities(struct isp_ccp2_device *ccp2)
{
- media_entity_cleanup(&ccp2->subdev.entity);
-
v4l2_device_unregister_subdev(&ccp2->subdev);
omap3isp_video_unregister(&ccp2->video_in);
}
@@ -1146,6 +1144,9 @@ void omap3isp_ccp2_cleanup(struct isp_device *isp)
{
struct isp_ccp2_device *ccp2 = &isp->isp_ccp2;
+ omap3isp_video_cleanup(&ccp2->video_in);
+ media_entity_cleanup(&ccp2->subdev.entity);
+
regulator_put(ccp2->vdds_csib);
}