Re: [PATCH] media: fix hdpvr build warning

From: Mauro Carvalho Chehab
Date: Thu Mar 21 2013 - 14:45:35 EST

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

> From: Randy Dunlap <rdunlap@xxxxxxxxxxxxx>
> 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@xxxxxxxxxxxxx>
> Reported-by: Geert Uytterhoeven <geert@xxxxxxxxxxxxxx>
> Cc: Janne Grunau <j@xxxxxxxxxx>

>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@xxxxxxxxxxxxxx>:

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

Signed-off-by: Mauro Carvalho Chehab <mchehab@xxxxxxxxxx>

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)

/* deregister I2C adapter */
-#if defined(CONFIG_I2C) || (CONFIG_I2C_MODULE)

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at