[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1450704978-17113-1-git-send-email-javier@osg.samsung.com>
Date: Mon, 21 Dec 2015 10:36:18 -0300
From: Javier Martinez Canillas <javier@....samsung.com>
To: linux-kernel@...r.kernel.org
Cc: Mauro Carvalho Chehab <mchehab@....samsung.com>,
Laurent Pinchart <laurent.pinchart@...asonboard.com>,
Fengguang Wu <fengguang.wu@...el.com>,
linux-media@...r.kernel.org,
Javier Martinez Canillas <javier@....samsung.com>
Subject: [PATCH] [media] uvcvideo: Only register media dev if MEDIA_CONTROLLER is defined
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:
from drivers/media/usb/uvc/uvc_driver.c:14:
drivers/media/usb/uvc/uvc_driver.c: In function 'uvc_probe':
drivers/media/usb/uvc/uvc_driver.c:1960:32: error: 'struct uvc_device' has no member named 'mdev'
if (media_device_register(&dev->mdev) < 0)
Fixes: 1590ad7b5271 ("[media] media-device: split media initialization and registration")
Reported-by: Fengguang Wu <fengguang.wu@...el.com>
Signed-off-by: Javier Martinez Canillas <javier@....samsung.com>
---
drivers/media/usb/uvc/uvc_driver.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/media/usb/uvc/uvc_driver.c b/drivers/media/usb/uvc/uvc_driver.c
index ddf035a23e3a..599390325c09 100644
--- a/drivers/media/usb/uvc/uvc_driver.c
+++ b/drivers/media/usb/uvc/uvc_driver.c
@@ -1957,10 +1957,11 @@ static int uvc_probe(struct usb_interface *intf,
if (uvc_register_chains(dev) < 0)
goto error;
+#ifdef CONFIG_MEDIA_CONTROLLER
/* Register the media device node */
if (media_device_register(&dev->mdev) < 0)
goto error;
-
+#endif
/* Save our data pointer in the interface data. */
usb_set_intfdata(intf, dev);
--
2.4.3
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists