summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/mt9m001.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@infradead.org>2008-02-15 14:17:03 +0000
committerMauro Carvalho Chehab <mchehab@infradead.org>2008-02-15 14:17:03 +0000
commita47972fa9d14e12d1adf54ecd767f7c1ce372b36 (patch)
tree0c488efec6b4a87cea233680ee7d1ef56ae2f4fd /linux/drivers/media/video/mt9m001.c
parent82912e3b888a6232cc26dff49947c7ab36d96c5c (diff)
downloadmediapointer-dvb-s2-a47972fa9d14e12d1adf54ecd767f7c1ce372b36.tar.gz
mediapointer-dvb-s2-a47972fa9d14e12d1adf54ecd767f7c1ce372b36.tar.bz2
Fix breakage in mt9m001 and mt9v022 driver if "CONFIG_GENERIC_GPIO is not set"
From: Guennadi Liakhovetski <g.liakhovetski@pengutronix.de> Both camera drivers can function without GPIO support, in which case they will only support the 10 bit data width mode. But the two respective switch have to depend on CONFIG_GENERIC_GPIO. Additionally remove redundant gpio_is_valid tests - they are repeated in bus_switch_request() functions. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@pengutronix.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'linux/drivers/media/video/mt9m001.c')
-rw-r--r--linux/drivers/media/video/mt9m001.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/linux/drivers/media/video/mt9m001.c b/linux/drivers/media/video/mt9m001.c
index b65ff7745..e3afc8205 100644
--- a/linux/drivers/media/video/mt9m001.c
+++ b/linux/drivers/media/video/mt9m001.c
@@ -17,7 +17,9 @@
#include <media/v4l2-chip-ident.h>
#include <media/soc_camera.h>
+#ifdef CONFIG_MT9M001_PCA9536_SWITCH
#include <asm/gpio.h>
+#endif
/* mt9m001 i2c address 0x5d
* The platform has to define i2c_board_info
@@ -223,10 +225,6 @@ static int mt9m001_set_capture_format(struct soc_camera_device *icd,
if ((mt9m001->datawidth != 10 && (width_flag == IS_DATAWIDTH_10)) ||
(mt9m001->datawidth != 9 && (width_flag == IS_DATAWIDTH_9)) ||
(mt9m001->datawidth != 8 && (width_flag == IS_DATAWIDTH_8))) {
- /* data width switch requested */
- if (!gpio_is_valid(mt9m001->switch_gpio))
- return -EINVAL;
-
/* Well, we actually only can do 10 or 8 bits... */
if (width_flag == IS_DATAWIDTH_9)
return -EINVAL;