From: Ingo Molnar <mingo@elte.hu>
To: linux-kernel@vger.kernel.org,
Mauro Carvalho Chehab <mchehab@infradead.org>
Cc: Guennadi Liakhovetski <g.liakhovetski@pengutronix.de>,
Jean Delvare <khali@linux-fr.org>
Subject: [patch] video: build fix for drivers/media/video/mt9v022.c
Date: Sat, 3 May 2008 18:30:58 +0200 [thread overview]
Message-ID: <20080503163058.GA15272@elte.hu> (raw)
x86.git testing found the following build bug on latest -git:
CC [M] drivers/media/video/mt9v022.o
drivers/media/video/mt9v022.c: In function 'bus_switch_request':
drivers/media/video/mt9v022.c:199: error: implicit declaration of function 'gpio_is_valid'
drivers/media/video/mt9v022.c:201: error: implicit declaration of function 'gpio_request'
drivers/media/video/mt9v022.c:207: error: implicit declaration of function 'gpio_direction_output'
drivers/media/video/mt9v022.c:211: error: implicit declaration of function 'gpio_free'
drivers/media/video/mt9v022.c: In function 'bus_switch_act':
drivers/media/video/mt9v022.c:237: error: implicit declaration of function 'gpio_set_value_cansleep'
make[2]: *** [drivers/media/video] Error 2
make[1]: *** [drivers/media] Error 2
make[1]: *** Waiting for unfinished jobs....
make: *** [drivers] Error 2
with this config:
http://redhat.com/~mingo/misc/config-Sat_May__3_16_08_39_CEST_2008.bad
the bug was that the driver uses GPIO functionality but only includes
the GPIO interface definitions for the CONFIG_MT9M001_PCA9536_SWITCH
case, which was not set in this config.
The quick fix seems to be to include linux/gpio.h unconditionally. (this
seems like a small cleanup as well as it removes and #ifdef is more
robust than an inclusion of asm/gpio.h) Not tested too much yet, so
please have another look in any case.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
drivers/media/video/mt9v022.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
Index: linux/drivers/media/video/mt9v022.c
===================================================================
--- linux.orig/drivers/media/video/mt9v022.c
+++ linux/drivers/media/video/mt9v022.c
@@ -13,15 +13,12 @@
#include <linux/i2c.h>
#include <linux/delay.h>
#include <linux/log2.h>
+#include <linux/gpio.h>
#include <media/v4l2-common.h>
#include <media/v4l2-chip-ident.h>
#include <media/soc_camera.h>
-#ifdef CONFIG_MT9M001_PCA9536_SWITCH
-#include <asm/gpio.h>
-#endif
-
/* mt9v022 i2c address 0x48, 0x4c, 0x58, 0x5c
* The platform has to define i2c_board_info
* and call i2c_register_board_info() */
next reply other threads:[~2008-05-03 16:31 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-03 16:30 Ingo Molnar [this message]
2008-05-03 17:02 ` [patch] video: build fix for drivers/media/video/mt9v022.c Guennadi Liakhovetski
2008-05-03 17:58 ` Ingo Molnar
2008-05-03 18:15 ` Guennadi Liakhovetski
2008-05-03 19:50 ` Ingo Molnar
2008-05-05 14:17 ` Guennadi Liakhovetski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080503163058.GA15272@elte.hu \
--to=mingo@elte.hu \
--cc=g.liakhovetski@pengutronix.de \
--cc=khali@linux-fr.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mchehab@infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox