linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] next: media: cx231xx: add #ifdef to fix compile error
@ 2015-12-22 10:27 Okash Khawaja
  2015-12-22 12:46 ` Javier Martinez Canillas
  0 siblings, 1 reply; 5+ messages in thread
From: Okash Khawaja @ 2015-12-22 10:27 UTC (permalink / raw)
  To: mchehab, javier; +Cc: linux-media, linux-kernel

Compiling linux-next gave this warning:

drivers/media/usb/cx231xx/cx231xx-cards.c: In function
‘cx231xx_usb_probe’:
drivers/media/usb/cx231xx/cx231xx-cards.c:1754:36: error: ‘struct
cx231xx’ has no member named ‘media_dev’
  retval = media_device_register(dev->media_dev);

Looking at the refactoring in past two commits, following seems like a
decent fix, i.e. to surround dev->media_dev by #ifdef
CONFIG_MEDIA_CONTROLLER.

Signed-off-by: Okash Khawaja <okash.khawaja@gmail.com>
---
 drivers/media/usb/cx231xx/cx231xx-cards.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/media/usb/cx231xx/cx231xx-cards.c b/drivers/media/usb/cx231xx/cx231xx-cards.c
index 35692d1..220a5db 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)
-- 
2.5.2


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] next: media: cx231xx: add #ifdef to fix compile error
  2015-12-22 10:27 [PATCH] next: media: cx231xx: add #ifdef to fix compile error Okash Khawaja
@ 2015-12-22 12:46 ` Javier Martinez Canillas
  2015-12-22 13:00   ` Okash Khawaja
  0 siblings, 1 reply; 5+ messages in thread
From: Javier Martinez Canillas @ 2015-12-22 12:46 UTC (permalink / raw)
  To: Okash Khawaja, mchehab; +Cc: linux-media, linux-kernel

Hello Okash,

On 12/22/2015 07:27 AM, Okash Khawaja wrote:
> Compiling linux-next gave this warning:
> 
> drivers/media/usb/cx231xx/cx231xx-cards.c: In function
> ‘cx231xx_usb_probe’:
> drivers/media/usb/cx231xx/cx231xx-cards.c:1754:36: error: ‘struct
> cx231xx’ has no member named ‘media_dev’
>   retval = media_device_register(dev->media_dev);
> 
> Looking at the refactoring in past two commits, following seems like a
> decent fix, i.e. to surround dev->media_dev by #ifdef
> CONFIG_MEDIA_CONTROLLER.
> 
> Signed-off-by: Okash Khawaja <okash.khawaja@gmail.com>
> ---
>  drivers/media/usb/cx231xx/cx231xx-cards.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/media/usb/cx231xx/cx231xx-cards.c b/drivers/media/usb/cx231xx/cx231xx-cards.c
> index 35692d1..220a5db 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)
>

Thanks for your patch, I've posted the same fix already:

https://lkml.org/lkml/2015/12/21/270

Best regards,
-- 
Javier Martinez Canillas
Open Source Group
Samsung Research America

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] next: media: cx231xx: add #ifdef to fix compile error
  2015-12-22 12:46 ` Javier Martinez Canillas
@ 2015-12-22 13:00   ` Okash Khawaja
  2015-12-22 13:08     ` Javier Martinez Canillas
  0 siblings, 1 reply; 5+ messages in thread
From: Okash Khawaja @ 2015-12-22 13:00 UTC (permalink / raw)
  To: Javier Martinez Canillas; +Cc: mchehab, linux-media, linux-kernel

On Tue, Dec 22, 2015 at 09:46:19AM -0300, Javier Martinez Canillas wrote:
> Hello Okash,
> 
> On 12/22/2015 07:27 AM, Okash Khawaja wrote:
> > Compiling linux-next gave this warning:
> > 
> > drivers/media/usb/cx231xx/cx231xx-cards.c: In function
> > ‘cx231xx_usb_probe’:
> > drivers/media/usb/cx231xx/cx231xx-cards.c:1754:36: error: ‘struct
> > cx231xx’ has no member named ‘media_dev’
> >   retval = media_device_register(dev->media_dev);
> > 
> > Looking at the refactoring in past two commits, following seems like a
> > decent fix, i.e. to surround dev->media_dev by #ifdef
> > CONFIG_MEDIA_CONTROLLER.
> > 
> > Signed-off-by: Okash Khawaja <okash.khawaja@gmail.com>
> > ---
> >  drivers/media/usb/cx231xx/cx231xx-cards.c | 2 ++
> >  1 file changed, 2 insertions(+)
> > 
> > diff --git a/drivers/media/usb/cx231xx/cx231xx-cards.c b/drivers/media/usb/cx231xx/cx231xx-cards.c
> > index 35692d1..220a5db 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)
> >
> 
> Thanks for your patch, I've posted the same fix already:
> 
> https://lkml.org/lkml/2015/12/21/270
> 
> Best regards,
> -- 
> Javier Martinez Canillas
> Open Source Group
> Samsung Research America

Cool. There was another similar compile error

https://lkml.org/lkml/2015/12/22/196

Thanks,
Okash

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] next: media: cx231xx: add #ifdef to fix compile error
  2015-12-22 13:00   ` Okash Khawaja
@ 2015-12-22 13:08     ` Javier Martinez Canillas
  2015-12-22 13:36       ` Okash Khawaja
  0 siblings, 1 reply; 5+ messages in thread
From: Javier Martinez Canillas @ 2015-12-22 13:08 UTC (permalink / raw)
  To: Okash Khawaja; +Cc: mchehab, linux-media, linux-kernel

Hello Okash,

On 12/22/2015 10:00 AM, Okash Khawaja wrote:

[snip]

> 
> Cool. There was another similar compile error
> 
> https://lkml.org/lkml/2015/12/22/196
>

Yes and you can see in that thread that I also mention
that was fixed already :)
 
> Thanks,
> Okash
> 

Best regards,
-- 
Javier Martinez Canillas
Open Source Group
Samsung Research America

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] next: media: cx231xx: add #ifdef to fix compile error
  2015-12-22 13:08     ` Javier Martinez Canillas
@ 2015-12-22 13:36       ` Okash Khawaja
  0 siblings, 0 replies; 5+ messages in thread
From: Okash Khawaja @ 2015-12-22 13:36 UTC (permalink / raw)
  To: Javier Martinez Canillas; +Cc: mchehab, linux-media, linux-kernel


> On 22 Dec 2015, at 13:08, Javier Martinez Canillas <javier@osg.samsung.com> wrote:
> 
> Hello Okash,
> 
> On 12/22/2015 10:00 AM, Okash Khawaja wrote:
> 
> [snip]
> 
>> 
>> Cool. There was another similar compile error
>> 
>> https://lkml.org/lkml/2015/12/22/196
> 
> Yes and you can see in that thread that I also mention
> that was fixed already :)
> 
>> Thanks,
>> Okash
> 
> Best regards,
> -- 
> Javier Martinez Canillas
> Open Source Group
> Samsung Research America

Of course! I'm blind. 

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-12-22 13:37 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-12-22 10:27 [PATCH] next: media: cx231xx: add #ifdef to fix compile error Okash Khawaja
2015-12-22 12:46 ` Javier Martinez Canillas
2015-12-22 13:00   ` Okash Khawaja
2015-12-22 13:08     ` Javier Martinez Canillas
2015-12-22 13:36       ` Okash Khawaja

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).