]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - drivers/media/video/omap3isp/ispccdc.c
[media] omap3isp: Move media_entity_cleanup() from unregister() to cleanup()
[mv-sheeva.git] / drivers / media / video / omap3isp / ispccdc.c
index 253fdcce2df29c33ececf6ea76abd280a104d33b..98804d5f89c2dbc3535fc7f9e4e3a0d122aa43a6 100644 (file)
@@ -2206,8 +2206,6 @@ static int ccdc_init_entities(struct isp_ccdc_device *ccdc)
 
 void omap3isp_ccdc_unregister_entities(struct isp_ccdc_device *ccdc)
 {
-       media_entity_cleanup(&ccdc->subdev.entity);
-
        v4l2_device_unregister_subdev(&ccdc->subdev);
        omap3isp_video_unregister(&ccdc->video_out);
 }
@@ -2287,6 +2285,9 @@ void omap3isp_ccdc_cleanup(struct isp_device *isp)
 {
        struct isp_ccdc_device *ccdc = &isp->isp_ccdc;
 
+       omap3isp_video_cleanup(&ccdc->video_out);
+       media_entity_cleanup(&ccdc->subdev.entity);
+
        /* Free LSC requests. As the CCDC is stopped there's no active request,
         * so only the pending request and the free queue need to be handled.
         */