From 91e64c884295c7347f9ea78347d5a5e2df2441f6 Mon Sep 17 00:00:00 2001 From: Ingo Molnar Date: Mon, 5 May 2008 13:57:50 -0300 Subject: V4L/DVB (7858): video: build fix for drivers/media/video/mt9v022.c 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 Signed-off-by: Guennadi Liakhovetski Signed-off-by: Mauro Carvalho Chehab --- drivers/media/video/mt9v022.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'drivers/media/video/mt9v022.c') diff --git a/drivers/media/video/mt9v022.c b/drivers/media/video/mt9v022.c index d1391ac55096..80f7668f3f46 100644 --- a/drivers/media/video/mt9v022.c +++ b/drivers/media/video/mt9v022.c @@ -13,15 +13,12 @@ #include #include #include +#include #include #include #include -#ifdef CONFIG_MT9M001_PCA9536_SWITCH -#include -#endif - /* mt9v022 i2c address 0x48, 0x4c, 0x58, 0x5c * The platform has to define i2c_board_info * and call i2c_register_board_info() */ -- cgit v1.2.3 From 7fb0fd05b2f03065ca4743e8c7446ec86329c4c8 Mon Sep 17 00:00:00 2001 From: Guennadi Liakhovetski Date: Mon, 5 May 2008 14:12:30 -0300 Subject: V4L/DVB (7859): mt9v022: fix a copy-paste error in comment Signed-off-by: Guennadi Liakhovetski Signed-off-by: Mauro Carvalho Chehab --- drivers/media/video/mt9v022.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/media/video/mt9v022.c') diff --git a/drivers/media/video/mt9v022.c b/drivers/media/video/mt9v022.c index 80f7668f3f46..1658fe590392 100644 --- a/drivers/media/video/mt9v022.c +++ b/drivers/media/video/mt9v022.c @@ -88,7 +88,7 @@ static const struct soc_camera_data_format mt9v022_monochrome_formats[] = { struct mt9v022 { struct i2c_client *client; struct soc_camera_device icd; - int model; /* V4L2_IDENT_MT9M001* codes from v4l2-chip-ident.h */ + int model; /* V4L2_IDENT_MT9V022* codes from v4l2-chip-ident.h */ int switch_gpio; u16 chip_control; unsigned char datawidth; -- cgit v1.2.3