From 9da10a20ba6b92d9756eeaaad204e108b2b214af Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Thu, 5 Jun 2008 10:06:53 -0300 Subject: backport I2C changes on several files From: Mauro Carvalho Chehab Some I2C API change patches were committed at kernel. Backport those changes to V4L/DVB tree. Signed-off-by: Mauro Carvalho Chehab --- linux/drivers/media/video/wm8775.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'linux/drivers/media/video/wm8775.c') diff --git a/linux/drivers/media/video/wm8775.c b/linux/drivers/media/video/wm8775.c index d0e47fb22..81a08d674 100644 --- a/linux/drivers/media/video/wm8775.c +++ b/linux/drivers/media/video/wm8775.c @@ -224,12 +224,23 @@ static int wm8775_remove(struct i2c_client *client) return 0; } +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 26) +static const struct i2c_device_id wm8775_id[] = { + { "wm8775", 0 }, + { } +}; +MODULE_DEVICE_TABLE(i2c, wm8775_id); + +#endif static struct v4l2_i2c_driver_data v4l2_i2c_data = { .name = "wm8775", .driverid = I2C_DRIVERID_WM8775, .command = wm8775_command, .probe = wm8775_probe, .remove = wm8775_remove, +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 26) + .id_table = wm8775_id, +#endif }; #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 5, 0) -- cgit v1.2.3