config SOC_CAMERA_MT9M001
        tristate "mt9m001 support"
-       depends on SOC_CAMERA && GENERIC_GPIO
+       depends on SOC_CAMERA
        select GPIO_PCA953X if MT9M001_PCA9536_SWITCH
        help
          This driver supports MT9M001 cameras from Micron, monochrome
 
 config MT9M001_PCA9536_SWITCH
        bool "pca9536 datawidth switch for mt9m001"
-       depends on SOC_CAMERA_MT9M001
+       depends on SOC_CAMERA_MT9M001 && GENERIC_GPIO
        help
          Select this if your MT9M001 camera uses a PCA9536 I2C GPIO
          extender to switch between 8 and 10 bit datawidth modes
 
 config SOC_CAMERA_MT9V022
        tristate "mt9v022 support"
-       depends on SOC_CAMERA && GENERIC_GPIO
+       depends on SOC_CAMERA
        select GPIO_PCA953X if MT9V022_PCA9536_SWITCH
        help
          This driver supports MT9V022 cameras from Micron
 
 config MT9V022_PCA9536_SWITCH
        bool "pca9536 datawidth switch for mt9v022"
-       depends on SOC_CAMERA_MT9V022
+       depends on SOC_CAMERA_MT9V022 && GENERIC_GPIO
        help
          Select this if your MT9V022 camera uses a PCA9536 I2C GPIO
          extender to switch between 8 and 10 bit datawidth modes
 
 #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
        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;
 
 #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
        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;