aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJavier Martinez Canillas <javier@osg.samsung.com>2015-12-21 13:07:12 -0200
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>2015-12-23 11:26:49 -0200
commit9289f8eaadbede0c84856dd974fe1f485a954274 (patch)
tree4527c3256eaaaa0dfcce54b64153db16405c7773
parentf7cbcee965f678666d5c86f3f1c676fe71200fb0 (diff)
[media] cx231xx: fix compilation when !CONFIG_MEDIA_CONTROLLER
Commit 1590ad7b5271 ("[media] media-device: split media initialization and registration") split the media dev initialization and registration but introduced a build error since media_device_register() was called unconditionally even when the MEDIA_CONTROLLER config was not enabled: drivers/media/usb/cx231xx/cx231xx-cards.c: In function 'cx231xx_usb_probe': drivers/media/usb/cx231xx/cx231xx-cards.c:1741:36: error: 'struct cx231xx' has no member named 'media_dev' retval = media_device_register(dev->media_dev); Fixes: 1590ad7b5271 ("[media] media-device: split media initialization and registration") Reported-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
-rw-r--r--drivers/media/usb/cx231xx/cx231xx-cards.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/media/usb/cx231xx/cx231xx-cards.c b/drivers/media/usb/cx231xx/cx231xx-cards.c
index 35692d19b652..220a5dba8a2d 100644
--- a/drivers/media/usb/cx231xx/cx231xx-cards.c
+++ b/drivers/media/usb/cx231xx/cx231xx-cards.c
@@ -1751,7 +1751,9 @@ static int cx231xx_usb_probe(struct usb_interface *interface,
if (retval < 0)
goto done;
+#ifdef CONFIG_MEDIA_CONTROLLER
retval = media_device_register(dev->media_dev);
+#endif
done:
if (retval < 0)

Privacy Policy