uvcvideo: Fix build if !MEDIA_CONTROLLER
Subsystems (2)
PATCH 1/1 uvcvideo: Fix build if !MEDIA_CONTROLLER
From: Thierry Reding <[email protected]>
Accesses to the UVC device's mdev field need to be protected by a preprocessor conditional to avoid build errors, since the field is only included if the MEDIA_CONTROLLER option is selected.
--- drivers/media/usb/uvc/uvc_driver.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/media/usb/uvc/uvc_driver.c +2 -0
@@ -1937,9 +1937,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);
Signature · 1 line
2.5.0
Hello Thierry,
Quoted 11 lines · Thierry Reding
From: Thierry Reding <[email protected]>
Accesses to the UVC device's mdev field need to be protected by a preprocessor conditional to avoid build errors, since the field is only included if the
MEDIA_CONTROLLERoption is selected.Fixes 1590ad7b5271 ("[media] media-device: split media initialization and registration")Cc Javier Martinez Canillas <[email protected]>Cc Mauro Carvalho Chehab <[email protected]>Signed-off-by Thierry Reding <[email protected]>---
Thanks for the patch but I've already posted the same fix a couple of days ago [0]. Since the offending commit still has not landed in mainline, Mauro squashed the fixes with the original commit and will refresh his next branch soon.
[0]: https://lkml.org/lkml/2015/12/21/224
Best regards,
Signature · 3 lines
Javier Martinez Canillas Open Source Group Samsung Research America