Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

media: omap3isp: Unregister media device as first

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>

authored by

Sakari Ailus and committed by
Mauro Carvalho Chehab
30efae3d 003aedae

+2 -1
+2 -1
drivers/media/platform/omap3isp/isp.c
··· 1587 1587 1588 1588 static void isp_unregister_entities(struct isp_device *isp) 1589 1589 { 1590 + media_device_unregister(&isp->media_dev); 1591 + 1590 1592 omap3isp_csi2_unregister_entities(&isp->isp_csi2a); 1591 1593 omap3isp_ccp2_unregister_entities(&isp->isp_ccp2); 1592 1594 omap3isp_ccdc_unregister_entities(&isp->isp_ccdc); ··· 1599 1597 omap3isp_stat_unregister_entities(&isp->isp_hist); 1600 1598 1601 1599 v4l2_device_unregister(&isp->v4l2_dev); 1602 - media_device_unregister(&isp->media_dev); 1603 1600 media_device_cleanup(&isp->media_dev); 1604 1601 } 1605 1602