diff options
author | Hans Verkuil <hverkuil@xs4all.nl> | 2009-03-29 13:55:46 +0200 |
---|---|---|
committer | Hans Verkuil <hverkuil@xs4all.nl> | 2009-03-29 13:55:46 +0200 |
commit | 341276db860080bc5939fe2554bf9fd3f8a81969 (patch) | |
tree | 81c44818117e2bf3f568387139863e480744f240 | |
parent | 18a4d91ee3e9c2e8eb6d7945a2a817115ee11546 (diff) | |
download | mediapointer-dvb-s2-341276db860080bc5939fe2554bf9fd3f8a81969.tar.gz mediapointer-dvb-s2-341276db860080bc5939fe2554bf9fd3f8a81969.tar.bz2 |
cx25840: remove legacy code for old-style i2c API
From: Hans Verkuil <hverkuil@xs4all.nl>
All drivers that use cx25840 are now converted to v4l2_subdev, so I can remove
the support for the old-style i2c API.
Priority: normal
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
-rw-r--r-- | linux/drivers/media/video/cx25840/cx25840-core.c | 23 |
1 files changed, 5 insertions, 18 deletions
diff --git a/linux/drivers/media/video/cx25840/cx25840-core.c b/linux/drivers/media/video/cx25840/cx25840-core.c index 5387a846f..6b55cd94b 100644 --- a/linux/drivers/media/video/cx25840/cx25840-core.c +++ b/linux/drivers/media/video/cx25840/cx25840-core.c @@ -39,7 +39,7 @@ #include <linux/delay.h> #include <media/v4l2-common.h> #include <media/v4l2-chip-ident.h> -#include <media/v4l2-i2c-drv-legacy.h> +#include <media/v4l2-i2c-drv.h> #include <media/cx25840.h> #include "compat.h" @@ -49,15 +49,17 @@ MODULE_DESCRIPTION("Conexant CX25840 audio/video decoder driver"); MODULE_AUTHOR("Ulf Eklund, Chris Kennedy, Hans Verkuil, Tyler Trafford"); MODULE_LICENSE("GPL"); -static unsigned short normal_i2c[] = { 0x88 >> 1, I2C_CLIENT_END }; - static int cx25840_debug; module_param_named(debug,cx25840_debug, int, 0644); MODULE_PARM_DESC(debug, "Debugging messages [0=Off (default) 1=On]"); +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 22) +static unsigned short normal_i2c[] = { 0x88 >> 1, I2C_CLIENT_END }; + I2C_CLIENT_INSMOD; +#endif /* ----------------------------------------------------------------------- */ @@ -1510,19 +1512,6 @@ static int cx25840_log_status(struct v4l2_subdev *sd) return 0; } -static int cx25840_command(struct i2c_client *client, unsigned cmd, void *arg) -{ - /* ignore this command */ - if (cmd == TUNER_SET_TYPE_ADDR || cmd == TUNER_SET_CONFIG) - return 0; - - /* Old-style drivers rely on initialization on first use, so - call the init whenever a command is issued to this driver. - New-style drivers using v4l2_subdev should call init explicitly. */ - cx25840_init(i2c_get_clientdata(client), 0); - return v4l2_subdev_command(i2c_get_clientdata(client), cmd, arg); -} - /* ----------------------------------------------------------------------- */ static const struct v4l2_subdev_core_ops cx25840_core_ops = { @@ -1663,8 +1652,6 @@ MODULE_DEVICE_TABLE(i2c, cx25840_id); #endif static struct v4l2_i2c_driver_data v4l2_i2c_data = { .name = "cx25840", - .driverid = I2C_DRIVERID_CX25840, - .command = cx25840_command, .probe = cx25840_probe, .remove = cx25840_remove, #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 26) |