summaryrefslogtreecommitdiff
path: root/drivers/media/usb
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@osg.samsung.com>2015-03-02 17:26:14 +0300
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>2015-03-02 17:29:39 +0300
commit89a2c1d60aa2cfcf4c9f194b4c923d72182be431 (patch)
tree7f459e266ff9e16a407f190cccc4180419828811 /drivers/media/usb
parent872b9dbedd4040f4511c909a09d39330624f057b (diff)
downloadlinux-89a2c1d60aa2cfcf4c9f194b4c923d72182be431.tar.xz
[media] use a function for DVB media controller register
This is really a simple function, but using it avoids to have if's inside the drivers. Also, the kABI becomes a little more clearer. This shouldn't generate any overhead, and the type check will happen when compiling with MC DVB enabled. So, let's do it. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/media/usb')
-rw-r--r--drivers/media/usb/cx231xx/cx231xx-dvb.c4
-rw-r--r--drivers/media/usb/dvb-usb-v2/dvb_usb_core.c2
-rw-r--r--drivers/media/usb/dvb-usb/dvb-usb-dvb.c2
3 files changed, 3 insertions, 5 deletions
diff --git a/drivers/media/usb/cx231xx/cx231xx-dvb.c b/drivers/media/usb/cx231xx/cx231xx-dvb.c
index 8bf2baae387f..ff39bf22442d 100644
--- a/drivers/media/usb/cx231xx/cx231xx-dvb.c
+++ b/drivers/media/usb/cx231xx/cx231xx-dvb.c
@@ -465,9 +465,7 @@ static int register_dvb(struct cx231xx_dvb *dvb,
dev->name, result);
goto fail_adapter;
}
-#ifdef CONFIG_MEDIA_CONTROLLER_DVB
- dvb->adapter.mdev = dev->media_dev;
-#endif
+ dvb_register_media_controller(&dvb->adapter, dev->media_dev);
/* Ensure all frontends negotiate bus access */
dvb->frontend->ops.ts_bus_ctrl = cx231xx_dvb_bus_ctrl;
diff --git a/drivers/media/usb/dvb-usb-v2/dvb_usb_core.c b/drivers/media/usb/dvb-usb-v2/dvb_usb_core.c
index 8bd08ba4f869..f5df9eaba04f 100644
--- a/drivers/media/usb/dvb-usb-v2/dvb_usb_core.c
+++ b/drivers/media/usb/dvb-usb-v2/dvb_usb_core.c
@@ -429,7 +429,7 @@ static void dvb_usbv2_media_device_register(struct dvb_usb_adapter *adap)
return;
}
- adap->dvb_adap.mdev = mdev;
+ dvb_register_media_controller(&adap->dvb_adap, mdev);
dev_info(&d->udev->dev, "media controller created\n");
diff --git a/drivers/media/usb/dvb-usb/dvb-usb-dvb.c b/drivers/media/usb/dvb-usb/dvb-usb-dvb.c
index 980d976960d9..7b7b834777b7 100644
--- a/drivers/media/usb/dvb-usb/dvb-usb-dvb.c
+++ b/drivers/media/usb/dvb-usb/dvb-usb-dvb.c
@@ -122,7 +122,7 @@ static void dvb_usb_media_device_register(struct dvb_usb_adapter *adap)
kfree(mdev);
return;
}
- adap->dvb_adap.mdev = mdev;
+ dvb_register_media_controller(&adap->dvb_adap, mdev);
dev_info(&d->udev->dev, "media controller created\n");
#endif