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/vp27smpx.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/vp27smpx.c')
-rw-r--r-- | drivers/media/video/vp27smpx.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/media/video/vp27smpx.c b/drivers/media/video/vp27smpx.c index fac0deba24af..a1f76ee032e7 100644 --- a/drivers/media/video/vp27smpx.c +++ b/drivers/media/video/vp27smpx.c | |||
@@ -130,8 +130,6 @@ static int vp27smpx_probe(struct i2c_client *client, | |||
130 | if (!i2c_check_functionality(client->adapter, I2C_FUNC_SMBUS_BYTE_DATA)) | 130 | if (!i2c_check_functionality(client->adapter, I2C_FUNC_SMBUS_BYTE_DATA)) |
131 | return -EIO; | 131 | return -EIO; |
132 | 132 | ||
133 | snprintf(client->name, sizeof(client->name) - 1, "vp27smpx"); | ||
134 | |||
135 | v4l_info(client, "chip found @ 0x%x (%s)\n", | 133 | v4l_info(client, "chip found @ 0x%x (%s)\n", |
136 | client->addr << 1, client->adapter->name); | 134 | client->addr << 1, client->adapter->name); |
137 | 135 | ||
@@ -154,11 +152,18 @@ static int vp27smpx_remove(struct i2c_client *client) | |||
154 | 152 | ||
155 | /* ----------------------------------------------------------------------- */ | 153 | /* ----------------------------------------------------------------------- */ |
156 | 154 | ||
155 | static const struct i2c_device_id vp27smpx_id[] = { | ||
156 | { "vp27smpx", 0 }, | ||
157 | { } | ||
158 | }; | ||
159 | MODULE_DEVICE_TABLE(i2c, vp27smpx_id); | ||
160 | |||
157 | static struct v4l2_i2c_driver_data v4l2_i2c_data = { | 161 | static struct v4l2_i2c_driver_data v4l2_i2c_data = { |
158 | .name = "vp27smpx", | 162 | .name = "vp27smpx", |
159 | .driverid = I2C_DRIVERID_VP27SMPX, | 163 | .driverid = I2C_DRIVERID_VP27SMPX, |
160 | .command = vp27smpx_command, | 164 | .command = vp27smpx_command, |
161 | .probe = vp27smpx_probe, | 165 | .probe = vp27smpx_probe, |
162 | .remove = vp27smpx_remove, | 166 | .remove = vp27smpx_remove, |
167 | .id_table = vp27smpx_id, | ||
163 | }; | 168 | }; |
164 | 169 | ||