mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 02:21:52 +09:00
media: omap3isp: Unregister media device as first
[ Upstream commit 30efae3d78 ]
While there are issues related to object lifetime management, unregister the
media device first when the driver is being unbound. This is slightly
safer.
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
ca48e5e30b
commit
bcdfccfd8d
@@ -1592,6 +1592,8 @@ static void isp_pm_complete(struct device *dev)
|
||||
|
||||
static void isp_unregister_entities(struct isp_device *isp)
|
||||
{
|
||||
media_device_unregister(&isp->media_dev);
|
||||
|
||||
omap3isp_csi2_unregister_entities(&isp->isp_csi2a);
|
||||
omap3isp_ccp2_unregister_entities(&isp->isp_ccp2);
|
||||
omap3isp_ccdc_unregister_entities(&isp->isp_ccdc);
|
||||
@@ -1602,7 +1604,6 @@ static void isp_unregister_entities(struct isp_device *isp)
|
||||
omap3isp_stat_unregister_entities(&isp->isp_hist);
|
||||
|
||||
v4l2_device_unregister(&isp->v4l2_dev);
|
||||
media_device_unregister(&isp->media_dev);
|
||||
media_device_cleanup(&isp->media_dev);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user