linux/drivers/media/platform/omap3isp
Javier Martinez Canillas 9832e155f1 [media] media-device: split media initialization and registration
The media device node is registered and so made visible to user-space
before entities are registered and links created which means that the
media graph obtained by user-space could be only partially enumerated
if that happens too early before all the graph has been created.

To avoid this race condition, split the media init and registration
in separate functions and only register the media device node when
all the pending subdevices have been registered, either explicitly
by the driver or asynchronously using v4l2_async_register_subdev().

The media_device_register() had a check for drivers not filling dev
and model fields but all drivers in mainline set them and not doing
it will be a driver bug so change the function return to void and
add a BUG_ON() for dev being NULL instead.

Also, add a media_device_cleanup() function that will destroy the
graph_mutex that is initialized in media_device_init().

[mchehab@osg.samsung.com: Fix compilation if !CONFIG_MEDIA_CONTROLLER
 and remove two warnings added by this changeset]
Suggested-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-01-11 12:19:15 -02:00
..
cfa_coef_table.h [media] omap3isp: Remove boilerplate disclaimer and FSF address 2014-08-21 15:25:12 -05:00
gamma_table.h [media] omap3isp: Remove boilerplate disclaimer and FSF address 2014-08-21 15:25:12 -05:00
isp.c [media] media-device: split media initialization and registration 2016-01-11 12:19:15 -02:00
isp.h [media] v4l: omap3isp: Drop platform data support 2015-08-16 13:18:06 -03:00
ispccdc.c [media] omap3isp: rename single labels to just error 2016-01-11 12:19:08 -02:00
ispccdc.h [media] omap3isp: remove per ISP module link creation functions 2016-01-11 12:19:07 -02:00
ispccp2.c [media] omap3isp: rename single labels to just error 2016-01-11 12:19:08 -02:00
ispccp2.h [media] omap3isp: remove per ISP module link creation functions 2016-01-11 12:19:07 -02:00
ispcsi2.c [media] omap3isp: remove per ISP module link creation functions 2016-01-11 12:19:07 -02:00
ispcsi2.h [media] omap3isp: remove per ISP module link creation functions 2016-01-11 12:19:07 -02:00
ispcsiphy.c [media] omap3isp: Add support for the Device Tree 2015-04-02 16:47:48 -03:00
ispcsiphy.h [media] v4l: omap3isp: Drop platform data support 2015-08-16 13:18:06 -03:00
isph3a.h [media] omap3isp: Remove boilerplate disclaimer and FSF address 2014-08-21 15:25:12 -05:00
isph3a_aewb.c [media] media: omap3isp: hist: Move histogram DMA to DMA engine 2015-04-02 16:37:13 -03:00
isph3a_af.c [media] media: omap3isp: hist: Move histogram DMA to DMA engine 2015-04-02 16:37:13 -03:00
isphist.c [media] omap3isp: Replace mmio_base_phys array with the histogram block base 2015-04-02 16:42:52 -03:00
isphist.h [media] omap3isp: Remove boilerplate disclaimer and FSF address 2014-08-21 15:25:12 -05:00
isppreview.c [media] omap3isp: remove per ISP module link creation functions 2016-01-11 12:19:07 -02:00
isppreview.h [media] omap3isp: remove per ISP module link creation functions 2016-01-11 12:19:07 -02:00
ispreg.h [media] omap3isp: ccdc: Support the interlaced field orders at the CCDC output 2014-08-21 15:25:14 -05:00
ispresizer.c [media] omap3isp: remove per ISP module link creation functions 2016-01-11 12:19:07 -02:00
ispresizer.h [media] omap3isp: remove per ISP module link creation functions 2016-01-11 12:19:07 -02:00
ispstat.c [media] media framework: rename pads init function to media_entity_pads_init() 2016-01-11 12:19:03 -02:00
ispstat.h [media] use v4l2_get_timestamp where possible 2015-10-01 08:29:23 -03:00
ispvideo.c [media] media framework: rename pads init function to media_entity_pads_init() 2016-01-11 12:19:03 -02:00
ispvideo.h [media] media: videobuf2: Restructure vb2_buffer 2015-10-01 09:04:43 -03:00
luma_enhance_table.h [media] omap3isp: Remove boilerplate disclaimer and FSF address 2014-08-21 15:25:12 -05:00
Makefile [media] omap3isp: Move to videobuf2 2014-05-25 11:38:53 -03:00
noise_filter_table.h [media] omap3isp: Remove boilerplate disclaimer and FSF address 2014-08-21 15:25:12 -05:00
omap3isp.h [media] v4l: omap3isp: Drop platform data support 2015-08-16 13:18:06 -03:00