@@ -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;
@@ -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 *);
Make the dvb core network support aware of the media controller and register the corresponding devices. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>