summaryrefslogtreecommitdiffstats
path: root/drivers/media/usb/em28xx/em28xx-dvb.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@osg.samsung.com>2016-01-27 07:07:24 -0200
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>2016-02-01 07:29:46 -0200
commit37ecc7b1278f4184a6869504f7074b4a54f112c5 (patch)
tree5266e84c7f09534f4b40b9b33bacb78c574ffc65 /drivers/media/usb/em28xx/em28xx-dvb.c
parentac88fce987bd3433706b1082e8a85408de63512c (diff)
downloadlinux-37ecc7b1278f4184a6869504f7074b4a54f112c5.tar.gz
linux-37ecc7b1278f4184a6869504f7074b4a54f112c5.tar.bz2
linux-37ecc7b1278f4184a6869504f7074b4a54f112c5.zip
[media] em28xx: add media controller support
Add the needed bits to make em28xx to create a media controller graph. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/media/usb/em28xx/em28xx-dvb.c')
-rw-r--r--drivers/media/usb/em28xx/em28xx-dvb.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/media/usb/em28xx/em28xx-dvb.c b/drivers/media/usb/em28xx/em28xx-dvb.c
index bf5c24467c65..ea80541d58f0 100644
--- a/drivers/media/usb/em28xx/em28xx-dvb.c
+++ b/drivers/media/usb/em28xx/em28xx-dvb.c
@@ -916,6 +916,9 @@ static int em28xx_register_dvb(struct em28xx_dvb *dvb, struct module *module,
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->fe[0]->ops.ts_bus_ctrl = em28xx_dvb_bus_ctrl;
@@ -994,8 +997,15 @@ static int em28xx_register_dvb(struct em28xx_dvb *dvb, struct module *module,
/* register network adapter */
dvb_net_init(&dvb->adapter, &dvb->net, &dvb->demux.dmx);
+
+ result = dvb_create_media_graph(&dvb->adapter, false);
+ if (result < 0)
+ goto fail_create_graph;
+
return 0;
+fail_create_graph:
+ dvb_net_release(&dvb->net);
fail_fe_conn:
dvb->demux.dmx.remove_frontend(&dvb->demux.dmx, &dvb->fe_mem);
fail_fe_mem: