[media] exynos4-is: Unregister fimc-is subdevs from the media device properly
authorSylwester Nawrocki <s.nawrocki@samsung.com>
Thu, 18 Apr 2013 12:05:54 +0000 (09:05 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Thu, 25 Apr 2013 12:35:56 +0000 (09:35 -0300)
Add missing v4l2_device_unregister_subdev() call for the FIMC-IS subdevs
(currently there is only the FIMC-IS-ISP subdev) so corresponding resources
are properly freed upon the media device driver module removal.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyugmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/platform/exynos4-is/media-dev.c

index 1dbd554227063309ff9c2665b82f2f6d303846c0..a371ee5e857afe8f553fb7caaf89eb269ef5ddb5 100644 (file)
@@ -823,6 +823,10 @@ static void fimc_md_unregister_entities(struct fimc_md *fmd)
                fimc_md_unregister_sensor(fmd->sensor[i].subdev);
                fmd->sensor[i].subdev = NULL;
        }
+
+       if (fmd->fimc_is)
+               v4l2_device_unregister_subdev(&fmd->fimc_is->isp.subdev);
+
        v4l2_info(&fmd->v4l2_dev, "Unregistered all entities\n");
 }