summaryrefslogtreecommitdiffstats
path: root/drivers/media/usb/cx231xx/cx231xx-dvb.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@osg.samsung.com>2015-01-01 15:37:17 +0100
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>2015-02-14 00:10:12 +0100
commit1d058bdcf5cc800fbfeece0204f7774556d341bb (patch)
treea98b9f562e24e927f66b0c768d39173a1e4d40d3 /drivers/media/usb/cx231xx/cx231xx-dvb.c
parent[media] dvbdev: add support for media controller (diff)
downloadlinux-1d058bdcf5cc800fbfeece0204f7774556d341bb.tar.xz
linux-1d058bdcf5cc800fbfeece0204f7774556d341bb.zip
[media] cx231xx: add media controller support
Let's add media controller support for this driver and register it for both V4L and DVB. The media controller on this driver is not mandatory, as it can fully work without it. So, if the media controller register fails, just print an error message, but proceed with device registering. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/media/usb/cx231xx/cx231xx-dvb.c')
-rw-r--r--drivers/media/usb/cx231xx/cx231xx-dvb.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/media/usb/cx231xx/cx231xx-dvb.c b/drivers/media/usb/cx231xx/cx231xx-dvb.c
index dd600b994e69..bb7e766cd30c 100644
--- a/drivers/media/usb/cx231xx/cx231xx-dvb.c
+++ b/drivers/media/usb/cx231xx/cx231xx-dvb.c
@@ -455,6 +455,7 @@ static int register_dvb(struct cx231xx_dvb *dvb,
mutex_init(&dvb->lock);
+
/* register adapter */
result = dvb_register_adapter(&dvb->adapter, dev->name, module, device,
adapter_nr);
@@ -464,6 +465,9 @@ static int register_dvb(struct cx231xx_dvb *dvb,
dev->name, result);
goto fail_adapter;
}
+#ifdef CONFIG_MEDIA_CONTROLLER_DVB
+ dvb->adapter.mdev = dev->media_dev;
+#endif
/* Ensure all frontends negotiate bus access */
dvb->frontend->ops.ts_bus_ctrl = cx231xx_dvb_bus_ctrl;