[4/5,media] au0828-core: fix compilation when !CONFIG_MEDIA_CONTROLLER
diff mbox

Message ID a1532b4df91d3444bb8f5a8925b0d5f2c0606fbd.1450285867.git.mchehab@osg.samsung.com
State New
Headers show

Commit Message

Mauro Carvalho Chehab Dec. 16, 2015, 5:11 p.m. UTC
commit 1590ad7b52714 ("[media] media-device: split media initialization
and registration") moved the media controller register to a
separate function. That caused the following compilation issue,
if !CONFIG_MEDIA_CONTROLLER:

vim +445 drivers/media/usb/au0828/au0828-core.c

   439		if (retval) {
   440			pr_err("%s() au0282_dev_register failed to create graph\n",
   441			       __func__);
   442			goto done;
   443		}
   444
 > 445		retval = media_device_register(dev->media_dev);
   446
   447	done:
   448		if (retval < 0)

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
---
 drivers/media/usb/au0828/au0828-core.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Javier Martinez Canillas Dec. 21, 2015, 1:46 p.m. UTC | #1
Hello Mauro,

On 12/16/2015 02:11 PM, Mauro Carvalho Chehab wrote:
> commit 1590ad7b52714 ("[media] media-device: split media initialization
> and registration") moved the media controller register to a
> separate function. That caused the following compilation issue,
> if !CONFIG_MEDIA_CONTROLLER:
> 
> vim +445 drivers/media/usb/au0828/au0828-core.c
> 
>    439		if (retval) {
>    440			pr_err("%s() au0282_dev_register failed to create graph\n",
>    441			       __func__);
>    442			goto done;
>    443		}
>    444
>  > 445		retval = media_device_register(dev->media_dev);
>    446
>    447	done:
>    448		if (retval < 0)
> 
> Reported-by: kbuild test robot <fengguang.wu@intel.com>
> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>

Looks good to me, sorry for forgetting to test with !CONFIG_MEDIA_CONTROLLER
and missing this...

Reviewed-by: Javier Martinez Canillas <javier@osg.samsung.com>

Best regards,

Patch
diff mbox

diff --git a/drivers/media/usb/au0828/au0828-core.c b/drivers/media/usb/au0828/au0828-core.c
index 2f91bbc633b4..101d32954fe8 100644
--- a/drivers/media/usb/au0828/au0828-core.c
+++ b/drivers/media/usb/au0828/au0828-core.c
@@ -458,7 +458,9 @@  static int au0828_usb_probe(struct usb_interface *interface,
 		goto done;
 	}
 
+#ifdef CONFIG_MEDIA_CONTROLLER
 	retval = media_device_register(dev->media_dev);
+#endif
 
 done:
 	if (retval < 0)