linux_dsm_epyc7002/drivers/media/usb/dvb-usb
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
..
a800.c
af9005-fe.c [media] dvb: Get rid of typedev usage for enums 2015-06-09 17:47:35 -03:00
af9005-remote.c
af9005-script.h
af9005.c [media] af9005: fix kernel panic on init if compiled without IR 2014-10-30 16:57:19 -02:00
af9005.h
az6027.c [media] dvb: Get rid of typedev usage for enums 2015-06-09 17:47:35 -03:00
az6027.h
cinergyT2-core.c
cinergyT2-fe.c [media] dvb: Get rid of typedev usage for enums 2015-06-09 17:47:35 -03:00
cinergyT2.h
cxusb.c [media] si2157: support selection of IF interface 2015-05-12 13:20:55 -03:00
cxusb.h [media] cxusb: remove TechnoTrend CT2-4400 and CT2-4650 devices 2014-12-04 13:30:29 -02:00
dib07x0.h
dib0700_core.c [media] rc-core: fix dib0700 scancode generation for RC5 2015-05-12 18:27:25 -03:00
dib0700_devices.c [media] dvb: Get rid of typedev usage for enums 2015-06-09 17:47:35 -03:00
dib0700.h [media] dvb: Get rid of typedev usage for enums 2015-06-09 17:47:35 -03:00
dibusb-common.c [media] dibusb: fix sparse warnings 2014-09-03 09:23:31 -03:00
dibusb-mb.c
dibusb-mc.c
dibusb.h [media] Fix typo in comments 2014-07-26 15:09:47 -03:00
digitv.c
digitv.h
dtt200u-fe.c [media] dvb: Get rid of typedev usage for enums 2015-06-09 17:47:35 -03:00
dtt200u.c
dtt200u.h
dtv5100.c
dtv5100.h
dvb-usb-common.h
dvb-usb-dvb.c [media] media-device: split media initialization and registration 2016-01-11 12:19:15 -02:00
dvb-usb-firmware.c
dvb-usb-i2c.c
dvb-usb-init.c
dvb-usb-remote.c [media] rc-core: remove protocol arrays 2014-07-25 19:10:43 -03:00
dvb-usb-urb.c
dvb-usb.h [media] dvb-usb: create one media_dev per adapter 2015-02-26 09:52:26 -03:00
dw2102.c [media] dvb: Get rid of typedev usage for enums 2015-06-09 17:47:35 -03:00
dw2102.h
friio-fe.c [media] dvb: Get rid of typedev usage for enums 2015-06-09 17:47:35 -03:00
friio.c
friio.h
gp8psk-fe.c [media] dvb: Get rid of typedev usage for enums 2015-06-09 17:47:35 -03:00
gp8psk.c
gp8psk.h
Kconfig [media] use https://linuxtv.org for LinuxTV URLs 2015-12-04 10:38:59 -02:00
m920x.c [media] media: remove emacs editor variables 2014-12-22 17:52:20 -02:00
m920x.h
Makefile
nova-t-usb2.c
opera1.c [media] dvb: Get rid of typedev usage for enums 2015-06-09 17:47:35 -03:00
pctv452e.c [media] pctv452e: Replace memset with eth_zero_addr 2015-08-11 12:57:01 -03:00
technisat-usb2.c [media] Technisat SkyStar USB HD,(DVB-S/S2) too much URBs for arm devices 2015-08-11 14:43:23 -03:00
ttusb2.c [media] rc-core: document the protocol type 2014-07-23 21:50:48 -03:00
ttusb2.h
umt-010.c
usb-urb.c
vp702x-fe.c [media] dvb: Get rid of typedev usage for enums 2015-06-09 17:47:35 -03:00
vp702x.c [media] vp702x: comment dead code 2015-05-01 06:10:18 -03:00
vp702x.h
vp7045-fe.c [media] dvb: Get rid of typedev usage for enums 2015-06-09 17:47:35 -03:00
vp7045.c
vp7045.h