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/m52790.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/m52790.c')
-rw-r--r-- | drivers/media/video/m52790.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/media/video/m52790.c b/drivers/media/video/m52790.c index 5b9dfa2c51b4..8e0160d275ca 100644 --- a/drivers/media/video/m52790.c +++ b/drivers/media/video/m52790.c | |||
@@ -135,8 +135,6 @@ static int m52790_probe(struct i2c_client *client, | |||
135 | if (!i2c_check_functionality(client->adapter, I2C_FUNC_SMBUS_BYTE_DATA)) | 135 | if (!i2c_check_functionality(client->adapter, I2C_FUNC_SMBUS_BYTE_DATA)) |
136 | return -EIO; | 136 | return -EIO; |
137 | 137 | ||
138 | snprintf(client->name, sizeof(client->name) - 1, "m52790"); | ||
139 | |||
140 | v4l_info(client, "chip found @ 0x%x (%s)\n", | 138 | v4l_info(client, "chip found @ 0x%x (%s)\n", |
141 | client->addr << 1, client->adapter->name); | 139 | client->addr << 1, client->adapter->name); |
142 | 140 | ||
@@ -159,11 +157,18 @@ static int m52790_remove(struct i2c_client *client) | |||
159 | 157 | ||
160 | /* ----------------------------------------------------------------------- */ | 158 | /* ----------------------------------------------------------------------- */ |
161 | 159 | ||
160 | static const struct i2c_device_id m52790_id[] = { | ||
161 | { "m52790", 0 }, | ||
162 | { } | ||
163 | }; | ||
164 | MODULE_DEVICE_TABLE(i2c, m52790_id); | ||
165 | |||
162 | static struct v4l2_i2c_driver_data v4l2_i2c_data = { | 166 | static struct v4l2_i2c_driver_data v4l2_i2c_data = { |
163 | .name = "m52790", | 167 | .name = "m52790", |
164 | .driverid = I2C_DRIVERID_M52790, | 168 | .driverid = I2C_DRIVERID_M52790, |
165 | .command = m52790_command, | 169 | .command = m52790_command, |
166 | .probe = m52790_probe, | 170 | .probe = m52790_probe, |
167 | .remove = m52790_remove, | 171 | .remove = m52790_remove, |
172 | .id_table = m52790_id, | ||
168 | }; | 173 | }; |
169 | 174 | ||