]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/media/video/saa717x.c
V4L/DVB (8487): videodev: replace videodev.h includes by videodev2.h where possible
[linux-2.6-omap-h63xx.git] / drivers / media / video / saa717x.c
index 53c5edbcf7ea1add2ce7ea1730ef0fd0332df3c3..af60ede5310d2bcc9acf0f7e12088e759e242d90 100644 (file)
@@ -35,7 +35,6 @@
 #include <linux/kernel.h>
 #include <linux/sched.h>
 
-#include <linux/videodev.h>
 #include <linux/videodev2.h>
 #include <linux/i2c.h>
 #include <media/v4l2-common.h>
@@ -1418,7 +1417,8 @@ static int saa717x_command(struct i2c_client *client, unsigned cmd, void *arg)
 /* i2c implementation */
 
 /* ----------------------------------------------------------------------- */
-static int saa717x_probe(struct i2c_client *client)
+static int saa717x_probe(struct i2c_client *client,
+                        const struct i2c_device_id *did)
 {
        struct saa717x_state *decoder;
        u8 id = 0;
@@ -1428,8 +1428,6 @@ static int saa717x_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, "saa717x");
-
        if (saa717x_write(client, 0x5a4, 0xfe) &&
                        saa717x_write(client, 0x5a5, 0x0f) &&
                        saa717x_write(client, 0x5a6, 0x00) &&
@@ -1506,6 +1504,12 @@ static int saa717x_remove(struct i2c_client *client)
 
 /* ----------------------------------------------------------------------- */
 
+static const struct i2c_device_id saa717x_id[] = {
+       { "saa717x", 0 },
+       { }
+};
+MODULE_DEVICE_TABLE(i2c, saa717x_id);
+
 static struct v4l2_i2c_driver_data v4l2_i2c_data = {
        .name = "saa717x",
        .driverid = I2C_DRIVERID_SAA717X,
@@ -1513,4 +1517,5 @@ static struct v4l2_i2c_driver_data v4l2_i2c_data = {
        .probe = saa717x_probe,
        .remove = saa717x_remove,
        .legacy_class = I2C_CLASS_TV_ANALOG | I2C_CLASS_TV_DIGITAL,
+       .id_table = saa717x_id,
 };