diff options
author | Jean Delvare <khali@linux-fr.org> | 2008-05-18 14:49:40 -0400 |
---|---|---|
committer | Jean Delvare <khali@hyperion.delvare> | 2008-05-18 14:49:40 -0400 |
commit | af294867a52bf718df835a688e8c786d550bee26 (patch) | |
tree | 9800d202fd40ba2f8978d3138e28319460038802 /drivers/media/video/cs53l32a.c | |
parent | 238a871e41ffbd9ba6608cac7c8b74549ac3bb9b (diff) |
i2c: Convert remaining new-style drivers to use module aliasing
Update all the remaining new-style i2c drivers to use standard module
aliasing instead of the old driver_name/type driver matching scheme.
Note that the tuner driver is a bit quirky at the moment, as it
overwrites i2c_client.name with arbitrary strings. We write "tuner"
back on remove, to make sure that driver cycling will work properly,
but there may still be troublesome corner cases.
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Diffstat (limited to 'drivers/media/video/cs53l32a.c')
-rw-r--r-- | drivers/media/video/cs53l32a.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/media/video/cs53l32a.c b/drivers/media/video/cs53l32a.c index 2dfd0afc62db..d965af860ab2 100644 --- a/drivers/media/video/cs53l32a.c +++ b/drivers/media/video/cs53l32a.c | |||
@@ -144,7 +144,8 @@ static int cs53l32a_probe(struct i2c_client *client, | |||
144 | if (!i2c_check_functionality(client->adapter, I2C_FUNC_SMBUS_BYTE_DATA)) | 144 | if (!i2c_check_functionality(client->adapter, I2C_FUNC_SMBUS_BYTE_DATA)) |
145 | return -EIO; | 145 | return -EIO; |
146 | 146 | ||
147 | snprintf(client->name, sizeof(client->name) - 1, "cs53l32a"); | 147 | if (!id) |
148 | strlcpy(client->name, "cs53l32a", sizeof(client->name)); | ||
148 | 149 | ||
149 | v4l_info(client, "chip found @ 0x%x (%s)\n", | 150 | v4l_info(client, "chip found @ 0x%x (%s)\n", |
150 | client->addr << 1, client->adapter->name); | 151 | client->addr << 1, client->adapter->name); |
@@ -175,10 +176,17 @@ static int cs53l32a_probe(struct i2c_client *client, | |||
175 | return 0; | 176 | return 0; |
176 | } | 177 | } |
177 | 178 | ||
179 | static const struct i2c_device_id cs53l32a_id[] = { | ||
180 | { "cs53l32a", 0 }, | ||
181 | { } | ||
182 | }; | ||
183 | MODULE_DEVICE_TABLE(i2c, cs53l32a_id); | ||
184 | |||
178 | static struct v4l2_i2c_driver_data v4l2_i2c_data = { | 185 | static struct v4l2_i2c_driver_data v4l2_i2c_data = { |
179 | .name = "cs53l32a", | 186 | .name = "cs53l32a", |
180 | .driverid = I2C_DRIVERID_CS53L32A, | 187 | .driverid = I2C_DRIVERID_CS53L32A, |
181 | .command = cs53l32a_command, | 188 | .command = cs53l32a_command, |
182 | .probe = cs53l32a_probe, | 189 | .probe = cs53l32a_probe, |
190 | .id_table = cs53l32a_id, | ||
183 | }; | 191 | }; |
184 | 192 | ||