V4L/DVB (8709): gspca: Fix initialization and controls of sn9x110 - ov7630.
[safe/jmp/linux-2.6] / drivers / media / video / m52790.c
index 5b9dfa2..89a781c 100644 (file)
@@ -26,7 +26,7 @@
 #include <asm/uaccess.h>
 #include <linux/i2c.h>
 #include <linux/i2c-id.h>
-#include <linux/videodev.h>
+#include <linux/videodev2.h>
 #include <media/m52790.h>
 #include <media/v4l2-common.h>
 #include <media/v4l2-chip-ident.h>
@@ -135,8 +135,6 @@ static int m52790_probe(struct i2c_client *client,
        if (!i2c_check_functionality(client->adapter, I2C_FUNC_SMBUS_BYTE_DATA))
                return -EIO;
 
-       snprintf(client->name, sizeof(client->name) - 1, "m52790");
-
        v4l_info(client, "chip found @ 0x%x (%s)\n",
                        client->addr << 1, client->adapter->name);
 
@@ -159,11 +157,17 @@ static int m52790_remove(struct i2c_client *client)
 
 /* ----------------------------------------------------------------------- */
 
+static const struct i2c_device_id m52790_id[] = {
+       { "m52790", 0 },
+       { }
+};
+MODULE_DEVICE_TABLE(i2c, m52790_id);
+
 static struct v4l2_i2c_driver_data v4l2_i2c_data = {
        .name = "m52790",
        .driverid = I2C_DRIVERID_M52790,
        .command = m52790_command,
        .probe = m52790_probe,
        .remove = m52790_remove,
+       .id_table = m52790_id,
 };
-