]> err.no Git - linux-2.6/blobdiff - drivers/media/video/saa717x.c
i2c: Convert remaining new-style drivers to use module aliasing
[linux-2.6] / drivers / media / video / saa717x.c
index 72c4081feff5e4d8af049bacbc5d62ab07181b3b..2220f9569941e04a767d1692546500294bc0cf7e 100644 (file)
@@ -1429,8 +1429,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) &&
@@ -1507,6 +1505,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,
@@ -1514,4 +1518,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,
 };