Originally the intention was to switch to the new style i2c API starting with
the introduction of the API in 2.6.22. However, the i2c_new_probed_device()
function has a lethal bug that wasn't fixed until 2.6.25. Or more accurately,
it was only fixed in the stable series of 2.6.25 and 2.6.26.
Given the fact that the new i2c API also changed starting with 2.6.26 (the
addition of i2c_device_id), it is easiest to switch APIs starting with
2.6.26.
This patch updates all the legacy code accordingly.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
return 0;
}
-
static const struct i2c_device_id tda9840_id[] = {
{ "tda9840", 0 },
{ }
return 0;
}
-
static const struct i2c_device_id tea6415c_id[] = {
{ "tea6415c", 0 },
{ }
return 0;
}
-
static const struct i2c_device_id tea6420_id[] = {
{ "tea6420", 0 },
{ }
return 0;
}
-
static int tuner_remove(struct i2c_client *client)
{
struct tuner *t = to_tuner(i2c_get_clientdata(client));
return 0;
}
-
/* This driver supports many devices and the idea is to let the driver
detect which device is present. So rather than listing all supported
devices here, we pretend to support a single, fake device type. */
static struct i2c_driver v4l2_i2c_driver;
-/* Bus-based I2C implementation for kernels >= 2.6.22 */
+/* Bus-based I2C implementation for kernels >= 2.6.26 */
static int __init v4l2_i2c_drv_init(void)
{