[PATCHv2 7/9] dvb core: add support for DVB net node at the media controller

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Make the dvb core network support aware of the media controller and
register the corresponding devices.

Signed-off-by: Mauro Carvalho Chehab <mchehab@xxxxxxxxxxxxxxx>

diff --git a/drivers/media/dvb-core/dvb_net.c b/drivers/media/dvb-core/dvb_net.c
index e4041f074909..cbb50da6b35f 100644
--- a/drivers/media/dvb-core/dvb_net.c
+++ b/drivers/media/dvb-core/dvb_net.c
@@ -1498,14 +1498,6 @@ static const struct file_operations dvb_net_fops = {
 	.llseek = noop_llseek,
 };
 
-static struct dvb_device dvbdev_net = {
-	.priv = NULL,
-	.users = 1,
-	.writers = 1,
-	.fops = &dvb_net_fops,
-};
-
-
 void dvb_net_release (struct dvb_net *dvbnet)
 {
 	int i;
@@ -1530,6 +1522,16 @@ int dvb_net_init (struct dvb_adapter *adap, struct dvb_net *dvbnet,
 		  struct dmx_demux *dmx)
 {
 	int i;
+	struct dvb_device dvbdev_net = {
+		.priv = NULL,
+		.users = 1,
+		.writers = 1,
+		.fops = &dvb_net_fops,
+#if defined(CONFIG_MEDIA_CONTROLLER)
+		.mdev = dvbnet->mdev,
+		.name = "dvb net",
+#endif
+	};
 
 	mutex_init(&dvbnet->ioctl_mutex);
 	dvbnet->demux = dmx;
diff --git a/drivers/media/dvb-core/dvb_net.h b/drivers/media/dvb-core/dvb_net.h
index ede78e8c8aa8..7e32e416a67c 100644
--- a/drivers/media/dvb-core/dvb_net.h
+++ b/drivers/media/dvb-core/dvb_net.h
@@ -28,6 +28,8 @@
 #include <linux/etherdevice.h>
 #include <linux/skbuff.h>
 
+#include <media/media-device.h>
+
 #include "dvbdev.h"
 
 #define DVB_NET_DEVICES_MAX 10
@@ -41,6 +43,10 @@ struct dvb_net {
 	unsigned int exit:1;
 	struct dmx_demux *demux;
 	struct mutex ioctl_mutex;
+
+#if defined(CONFIG_MEDIA_CONTROLLER)
+	struct media_device *mdev;
+#endif
 };
 
 void dvb_net_release(struct dvb_net *);
-- 
2.1.0

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux