@@ -2612,12 +2612,16 @@ int dvb_register_frontend(struct dvb_adapter* dvb,
struct dvb_frontend* fe)
{
struct dvb_frontend_private *fepriv;
- static const struct dvb_device dvbdev_template = {
+ const struct dvb_device dvbdev_template = {
.users = ~0,
.writers = 1,
.readers = (~0)-1,
.fops = &dvb_frontend_fops,
- .kernel_ioctl = dvb_frontend_ioctl
+ .kernel_ioctl = dvb_frontend_ioctl,
+#if defined(CONFIG_MEDIA_CONTROLLER)
+ .mdev = fe->mdev,
+ .name = fe->ops.info.name,
+#endif
};
dev_dbg(dvb->device, "%s:\n", __func__);
@@ -40,6 +40,8 @@
#include <linux/dvb/frontend.h>
+#include <media/media-device.h>
+
#include "dvbdev.h"
/*
@@ -415,6 +417,11 @@ struct dtv_frontend_properties {
struct dvb_frontend {
struct dvb_frontend_ops ops;
struct dvb_adapter *dvb;
+
+#if defined(CONFIG_MEDIA_CONTROLLER)
+ struct media_device *mdev;
+#endif
+
void *demodulator_priv;
void *tuner_priv;
void *frontend_priv;
Now that the dvb core is capable of registering devices via the media controller, add support for the DVB frontend devices. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>