linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] media: fix hdpvr build warning
       [not found] <alpine.DEB.2.00.1303112254140.16847@ayla.of.borg>
@ 2013-03-12 18:40 ` Randy Dunlap
  2013-03-21 18:45   ` Mauro Carvalho Chehab
  0 siblings, 1 reply; 4+ messages in thread
From: Randy Dunlap @ 2013-03-12 18:40 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Linux Kernel Development, Janne Grunau, linux-media,
	Mauro Carvalho Chehab, Hans Verkuil

From: Randy Dunlap <rdunlap@infradead.org>

Fix build warning in hdpvr:

drivers/media/usb/hdpvr/hdpvr-video.c: warning: "CONFIG_I2C_MODULE" is not defined [-Wundef]

Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Janne Grunau <j@jannau.net>
---
 drivers/media/usb/hdpvr/hdpvr-video.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- lnx-39-rc2.orig/drivers/media/usb/hdpvr/hdpvr-video.c
+++ lnx-39-rc2/drivers/media/usb/hdpvr/hdpvr-video.c
@@ -1238,7 +1238,7 @@ static void hdpvr_device_release(struct
 	v4l2_device_unregister(&dev->v4l2_dev);
 
 	/* deregister I2C adapter */
-#if defined(CONFIG_I2C) || (CONFIG_I2C_MODULE)
+#if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE)
 	mutex_lock(&dev->i2c_mutex);
 	i2c_del_adapter(&dev->i2c_adapter);
 	mutex_unlock(&dev->i2c_mutex);

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

* Re: [PATCH] media: fix hdpvr build warning
  2013-03-12 18:40 ` [PATCH] media: fix hdpvr build warning Randy Dunlap
@ 2013-03-21 18:45   ` Mauro Carvalho Chehab
  2013-03-21 18:57     ` Randy Dunlap
  0 siblings, 1 reply; 4+ messages in thread
From: Mauro Carvalho Chehab @ 2013-03-21 18:45 UTC (permalink / raw)
  To: Randy Dunlap
  Cc: Geert Uytterhoeven, Linux Kernel Development, Janne Grunau,
	linux-media, Hans Verkuil

Em Tue, 12 Mar 2013 11:40:29 -0700
Randy Dunlap <rdunlap@infradead.org> escreveu:

> From: Randy Dunlap <rdunlap@infradead.org>
> 
> Fix build warning in hdpvr:
> 
> drivers/media/usb/hdpvr/hdpvr-video.c: warning: "CONFIG_I2C_MODULE" is not defined [-Wundef]
> 
> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
> Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
> Cc: Janne Grunau <j@jannau.net>

>From time to time, people used to write those checks wrong. So,
we're now using a macro to avoid those problems (IS_ENABLED). The better
is to also use it here.

-

[PATCH] Use the proper check for I2C support

As reported by Geert Uytterhoeven <geert@linux-m68k.org>:

	drivers/media/usb/hdpvr/hdpvr-video.c: warning: "CONFIG_I2C_MODULE" is not defined [-Wundef]

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>

diff --git a/drivers/media/usb/hdpvr/hdpvr-video.c b/drivers/media/usb/hdpvr/hdpvr-video.c
index da6b779..554d2eb 100644
--- a/drivers/media/usb/hdpvr/hdpvr-video.c
+++ b/drivers/media/usb/hdpvr/hdpvr-video.c
@@ -1238,7 +1238,7 @@ static void hdpvr_device_release(struct video_device *vdev)
 	v4l2_device_unregister(&dev->v4l2_dev);
 
 	/* deregister I2C adapter */
-#if defined(CONFIG_I2C) || (CONFIG_I2C_MODULE)
+#if IS_ENABLED(CONFIG_I2C)
 	mutex_lock(&dev->i2c_mutex);
 	i2c_del_adapter(&dev->i2c_adapter);
 	mutex_unlock(&dev->i2c_mutex);

Cheers,
Mauro

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

* Re: [PATCH] media: fix hdpvr build warning
  2013-03-21 18:45   ` Mauro Carvalho Chehab
@ 2013-03-21 18:57     ` Randy Dunlap
  2013-03-21 21:08       ` Mauro Carvalho Chehab
  0 siblings, 1 reply; 4+ messages in thread
From: Randy Dunlap @ 2013-03-21 18:57 UTC (permalink / raw)
  To: Mauro Carvalho Chehab
  Cc: Geert Uytterhoeven, Linux Kernel Development, Janne Grunau,
	linux-media, Hans Verkuil

On 03/21/13 11:45, Mauro Carvalho Chehab wrote:
> Em Tue, 12 Mar 2013 11:40:29 -0700
> Randy Dunlap <rdunlap@infradead.org> escreveu:
> 
>> From: Randy Dunlap <rdunlap@infradead.org>
>>
>> Fix build warning in hdpvr:
>>
>> drivers/media/usb/hdpvr/hdpvr-video.c: warning: "CONFIG_I2C_MODULE" is not defined [-Wundef]
>>
>> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
>> Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
>> Cc: Janne Grunau <j@jannau.net>
> 
> From time to time, people used to write those checks wrong. So,
> we're now using a macro to avoid those problems (IS_ENABLED). The better
> is to also use it here.
> 

>From time to time, people omit including header files that should be
included.  Please add

#include <linux/kconfig.h>

to this patch.

Thank you.


> -
> 
> [PATCH] Use the proper check for I2C support
> 
> As reported by Geert Uytterhoeven <geert@linux-m68k.org>:
> 
> 	drivers/media/usb/hdpvr/hdpvr-video.c: warning: "CONFIG_I2C_MODULE" is not defined [-Wundef]
> 
> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
> 
> diff --git a/drivers/media/usb/hdpvr/hdpvr-video.c b/drivers/media/usb/hdpvr/hdpvr-video.c
> index da6b779..554d2eb 100644
> --- a/drivers/media/usb/hdpvr/hdpvr-video.c
> +++ b/drivers/media/usb/hdpvr/hdpvr-video.c
> @@ -1238,7 +1238,7 @@ static void hdpvr_device_release(struct video_device *vdev)
>  	v4l2_device_unregister(&dev->v4l2_dev);
>  
>  	/* deregister I2C adapter */
> -#if defined(CONFIG_I2C) || (CONFIG_I2C_MODULE)
> +#if IS_ENABLED(CONFIG_I2C)
>  	mutex_lock(&dev->i2c_mutex);
>  	i2c_del_adapter(&dev->i2c_adapter);
>  	mutex_unlock(&dev->i2c_mutex);
> 
> Cheers,
> Mauro
> 


-- 
~Randy

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

* Re: [PATCH] media: fix hdpvr build warning
  2013-03-21 18:57     ` Randy Dunlap
@ 2013-03-21 21:08       ` Mauro Carvalho Chehab
  0 siblings, 0 replies; 4+ messages in thread
From: Mauro Carvalho Chehab @ 2013-03-21 21:08 UTC (permalink / raw)
  To: Randy Dunlap
  Cc: Geert Uytterhoeven, Linux Kernel Development, Janne Grunau,
	linux-media, Hans Verkuil

Em Thu, 21 Mar 2013 11:57:24 -0700
Randy Dunlap <rdunlap@infradead.org> escreveu:

> On 03/21/13 11:45, Mauro Carvalho Chehab wrote:
> > Em Tue, 12 Mar 2013 11:40:29 -0700
> > Randy Dunlap <rdunlap@infradead.org> escreveu:
> > 
> >> From: Randy Dunlap <rdunlap@infradead.org>
> >>
> >> Fix build warning in hdpvr:
> >>
> >> drivers/media/usb/hdpvr/hdpvr-video.c: warning: "CONFIG_I2C_MODULE" is not defined [-Wundef]
> >>
> >> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
> >> Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
> >> Cc: Janne Grunau <j@jannau.net>
> > 
> > From time to time, people used to write those checks wrong. So,
> > we're now using a macro to avoid those problems (IS_ENABLED). The better
> > is to also use it here.
> > 
> 
> From time to time, people omit including header files that should be
> included.

Heh ;)

> Please add
> 
> #include <linux/kconfig.h>
> 
> to this patch.


Ok, I'll do it.
> 
> Thank you.
> 
> 
> > -
> > 
> > [PATCH] Use the proper check for I2C support
> > 
> > As reported by Geert Uytterhoeven <geert@linux-m68k.org>:
> > 
> > 	drivers/media/usb/hdpvr/hdpvr-video.c: warning: "CONFIG_I2C_MODULE" is not defined [-Wundef]
> > 
> > Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
> > 
> > diff --git a/drivers/media/usb/hdpvr/hdpvr-video.c b/drivers/media/usb/hdpvr/hdpvr-video.c
> > index da6b779..554d2eb 100644
> > --- a/drivers/media/usb/hdpvr/hdpvr-video.c
> > +++ b/drivers/media/usb/hdpvr/hdpvr-video.c
> > @@ -1238,7 +1238,7 @@ static void hdpvr_device_release(struct video_device *vdev)
> >  	v4l2_device_unregister(&dev->v4l2_dev);
> >  
> >  	/* deregister I2C adapter */
> > -#if defined(CONFIG_I2C) || (CONFIG_I2C_MODULE)
> > +#if IS_ENABLED(CONFIG_I2C)
> >  	mutex_lock(&dev->i2c_mutex);
> >  	i2c_del_adapter(&dev->i2c_adapter);
> >  	mutex_unlock(&dev->i2c_mutex);
> > 
> > Cheers,
> > Mauro
> > 
> 
> 


-- 

Cheers,
Mauro

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

end of thread, other threads:[~2013-03-21 21:09 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <alpine.DEB.2.00.1303112254140.16847@ayla.of.borg>
2013-03-12 18:40 ` [PATCH] media: fix hdpvr build warning Randy Dunlap
2013-03-21 18:45   ` Mauro Carvalho Chehab
2013-03-21 18:57     ` Randy Dunlap
2013-03-21 21:08       ` Mauro Carvalho Chehab

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).