]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/media/video/saa7127.c
V4L/DVB (8199): gspca: Compile warnings about NULL ptr.
[linux-2.6-omap-h63xx.git] / drivers / media / video / saa7127.c
index 06c88db656b41d4a8a94dc67ef9814c4fe852e50..79d11a658bdfff44b12e9128a0d3e0f5624d6e1d 100644 (file)
@@ -661,7 +661,8 @@ static int saa7127_command(struct i2c_client *client,
 
 /* ----------------------------------------------------------------------- */
 
-static int saa7127_probe(struct i2c_client *client)
+static int saa7127_probe(struct i2c_client *client,
+                        const struct i2c_device_id *id)
 {
        struct saa7127_state *state;
        struct v4l2_sliced_vbi_data vbi = { 0, 0, 0, 0 };  /* set to disabled */
@@ -671,8 +672,6 @@ static int saa7127_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, "saa7127");
-
        v4l_dbg(1, debug, client, "detecting saa7127 client on address 0x%x\n",
                        client->addr << 1);
 
@@ -740,11 +739,18 @@ static int saa7127_remove(struct i2c_client *client)
 
 /* ----------------------------------------------------------------------- */
 
+static struct i2c_device_id saa7127_id[] = {
+       { "saa7127", 0 },
+       { }
+};
+MODULE_DEVICE_TABLE(i2c, saa7127_id);
+
 static struct v4l2_i2c_driver_data v4l2_i2c_data = {
        .name = "saa7127",
        .driverid = I2C_DRIVERID_SAA7127,
        .command = saa7127_command,
        .probe = saa7127_probe,
        .remove = saa7127_remove,
+       .id_table = saa7127_id,
 };