]> err.no Git - linux-2.6/blobdiff - drivers/media/video/mt9m001.c
V4L/DVB (7975): saa7134_empress
[linux-2.6] / drivers / media / video / mt9m001.c
index 04864cf2579cbfb2a2d6d5046337aac25b5193c7..ee43499544c13d9f01cd12d1c973762099475db8 100644 (file)
 #include <linux/slab.h>
 #include <linux/i2c.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
-
 /* mt9m001 i2c address 0x5d
  * The platform has to define i2c_board_info
  * and call i2c_register_board_info() */
@@ -620,7 +617,8 @@ static void mt9m001_video_remove(struct soc_camera_device *icd)
        soc_camera_video_stop(&mt9m001->icd);
 }
 
-static int mt9m001_probe(struct i2c_client *client)
+static int mt9m001_probe(struct i2c_client *client,
+                        const struct i2c_device_id *did)
 {
        struct mt9m001 *mt9m001;
        struct soc_camera_device *icd;
@@ -696,12 +694,19 @@ static int mt9m001_remove(struct i2c_client *client)
        return 0;
 }
 
+static const struct i2c_device_id mt9m001_id[] = {
+       { "mt9m001", 0 },
+       { }
+};
+MODULE_DEVICE_TABLE(i2c, mt9m001_id);
+
 static struct i2c_driver mt9m001_i2c_driver = {
        .driver = {
                .name = "mt9m001",
        },
        .probe          = mt9m001_probe,
        .remove         = mt9m001_remove,
+       .id_table       = mt9m001_id,
 };
 
 static int __init mt9m001_mod_init(void)