summaryrefslogtreecommitdiff
path: root/drivers/media/video/mt9v022.c
diff options
context:
space:
mode:
authorGuennadi Liakhovetski <g.liakhovetski@pengutronix.de>2008-04-22 21:42:08 +0400
committerMauro Carvalho Chehab <mchehab@infradead.org>2008-04-24 21:07:43 +0400
commitef6ad5c35ed7233e7aafcc5645a1470199b10cc7 (patch)
treeb6a540d8e7ce973b65e139bd0185d8002a5ed36f /drivers/media/video/mt9v022.c
parentb4333a3baecfeee35317c03cf08952cc04bd149a (diff)
downloadlinux-ef6ad5c35ed7233e7aafcc5645a1470199b10cc7.tar.xz
V4L/DVB (7218): Fix breakage in mt9m001 and mt9v022 driver if "CONFIG_GENERIC_GPIO is not set"
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 'drivers/media/video/mt9v022.c')
-rw-r--r--drivers/media/video/mt9v022.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/media/video/mt9v022.c b/drivers/media/video/mt9v022.c
index 5fbeaa305f35..468333946d57 100644
--- a/drivers/media/video/mt9v022.c
+++ b/drivers/media/video/mt9v022.c
@@ -18,7 +18,9 @@
#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
@@ -302,10 +304,6 @@ static int mt9v022_set_capture_format(struct soc_camera_device *icd,
if ((mt9v022->datawidth != 10 && (width_flag == IS_DATAWIDTH_10)) ||
(mt9v022->datawidth != 9 && (width_flag == IS_DATAWIDTH_9)) ||
(mt9v022->datawidth != 8 && (width_flag == IS_DATAWIDTH_8))) {
- /* data width switch requested */
- if (!gpio_is_valid(mt9v022->switch_gpio))
- return -EINVAL;
-
/* Well, we actually only can do 10 or 8 bits... */
if (width_flag == IS_DATAWIDTH_9)
return -EINVAL;