if (smsdvb_debugfs_create(client) < 0)
pr_info("failed to create debugfs node\n");
- dvb_create_media_graph(coredev->media_dev);
+ dvb_create_media_graph(&client->adapter);
pr_info("DVB interface registered.\n");
return 0;
EXPORT_SYMBOL(dvb_unregister_device);
-void dvb_create_media_graph(struct media_device *mdev)
-{
#ifdef CONFIG_MEDIA_CONTROLLER_DVB
+void dvb_create_media_graph(struct dvb_adapter *adap)
+{
+ struct media_device *mdev = adap->mdev;
struct media_entity *entity, *tuner = NULL, *fe = NULL;
struct media_entity *demux = NULL, *dvr = NULL, *ca = NULL;
if (demux && ca)
media_entity_create_link(demux, 1, ca, 0, MEDIA_LNK_FL_ENABLED);
-#endif
}
EXPORT_SYMBOL_GPL(dvb_create_media_graph);
+#endif
static int dvbdev_check_free_adapter_num(int num)
{
int type);
extern void dvb_unregister_device (struct dvb_device *dvbdev);
-void dvb_create_media_graph(struct media_device *mdev);
+
+#ifdef CONFIG_MEDIA_CONTROLLER_DVB
+void dvb_create_media_graph(struct dvb_adapter *adap);
+#else
+static inline void dvb_create_media_graph(struct dvb_adapter *adap) {}
+#endif
extern int dvb_generic_open (struct inode *inode, struct file *file);
extern int dvb_generic_release (struct inode *inode, struct file *file);
/* register network adapter */
dvb_net_init(&dvb->adapter, &dvb->net, &dvb->demux.dmx);
-#ifdef CONFIG_MEDIA_CONTROLLER_DVB
- dvb_create_media_graph(dev->media_dev);
-#endif
+ dvb_create_media_graph(&dvb->adapter);
+
return 0;
fail_fe_conn:
}
}
- dvb_create_media_graph(adap->dvb_adap.mdev);
+ dvb_create_media_graph(&adap->dvb_adap);
return 0;
adap->num_frontends_initialized++;
}
- dvb_create_media_graph(adap->dvb_adap.mdev);
+ dvb_create_media_graph(&adap->dvb_adap);
return 0;
}