summaryrefslogtreecommitdiff
path: root/drivers/staging/media/omap4iss/iss_ipipe.c
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2014-12-11 16:23:57 +0300
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>2015-04-03 03:17:04 +0300
commit9d9104fb9db90f7d806b1f0ba270c209b8d4fa25 (patch)
treeb790902cab2d1a2e978ea9668c3013285a2e2460 /drivers/staging/media/omap4iss/iss_ipipe.c
parente831cd251fb91d6c25352d322743db0d17ea11dd (diff)
downloadlinux-9d9104fb9db90f7d806b1f0ba270c209b8d4fa25.tar.xz
[media] staging: media: omap4iss: Cleanup media entities after unregistration
The ipipeif, ipipe and resizer media entities are cleaned up before unregistering the media device, creating a race condition. Fix it by cleaning them up at cleanup time. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/staging/media/omap4iss/iss_ipipe.c')
-rw-r--r--drivers/staging/media/omap4iss/iss_ipipe.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/staging/media/omap4iss/iss_ipipe.c b/drivers/staging/media/omap4iss/iss_ipipe.c
index ff1d8cf3d284..eaa82da30f50 100644
--- a/drivers/staging/media/omap4iss/iss_ipipe.c
+++ b/drivers/staging/media/omap4iss/iss_ipipe.c
@@ -516,8 +516,6 @@ static int ipipe_init_entities(struct iss_ipipe_device *ipipe)
void omap4iss_ipipe_unregister_entities(struct iss_ipipe_device *ipipe)
{
- media_entity_cleanup(&ipipe->subdev.entity);
-
v4l2_device_unregister_subdev(&ipipe->subdev);
}
@@ -566,5 +564,7 @@ int omap4iss_ipipe_init(struct iss_device *iss)
*/
void omap4iss_ipipe_cleanup(struct iss_device *iss)
{
- /* FIXME: are you sure there's nothing to do? */
+ struct iss_ipipe_device *ipipe = &iss->ipipe;
+
+ media_entity_cleanup(&ipipe->subdev.entity);
}