diff options
author | Hans Verkuil <hverkuil@xs4all.nl> | 2009-03-29 22:34:31 +0200 |
---|---|---|
committer | Hans Verkuil <hverkuil@xs4all.nl> | 2009-03-29 22:34:31 +0200 |
commit | 781dcf110fb80cdf01c81c5b28fc65a8a4f130da (patch) | |
tree | 1da40e829ec9e9f1eff3ff3e23d4e247a73d2c4a /linux/drivers | |
parent | 20f6e4bc070bb70c5bf336281b7a80d531bfc3f8 (diff) | |
download | mediapointer-dvb-s2-781dcf110fb80cdf01c81c5b28fc65a8a4f130da.tar.gz mediapointer-dvb-s2-781dcf110fb80cdf01c81c5b28fc65a8a4f130da.tar.bz2 |
tvp5150: remove i2c legacy code.
From: Hans Verkuil <hverkuil@xs4all.nl>
All drivers that use tvp5150 now use v4l2_subdev, so we can remove the
legacy code from tvp5150.
Priority: normal
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Diffstat (limited to 'linux/drivers')
-rw-r--r-- | linux/drivers/media/video/tvp5150.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/linux/drivers/media/video/tvp5150.c b/linux/drivers/media/video/tvp5150.c index 67c18f280..3b1eab033 100644 --- a/linux/drivers/media/video/tvp5150.c +++ b/linux/drivers/media/video/tvp5150.c @@ -11,7 +11,7 @@ #include <linux/delay.h> #include <media/v4l2-device.h> #include <media/tvp5150.h> -#include <media/v4l2-i2c-drv-legacy.h> +#include <media/v4l2-i2c-drv.h> #include <media/v4l2-chip-ident.h> #include "tvp5150_reg.h" @@ -20,6 +20,7 @@ MODULE_DESCRIPTION("Texas Instruments TVP5150A video decoder driver"); MODULE_AUTHOR("Mauro Carvalho Chehab"); MODULE_LICENSE("GPL"); +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 22) /* standard i2c insmod options */ static unsigned short normal_i2c[] = { 0xb8 >> 1, @@ -28,6 +29,7 @@ static unsigned short normal_i2c[] = { }; I2C_CLIENT_INSMOD; +#endif static int debug; module_param(debug, int, 0); @@ -1093,11 +1095,6 @@ static int tvp5150_queryctrl(struct v4l2_subdev *sd, struct v4l2_queryctrl *qc) return -EINVAL; } -static int tvp5150_command(struct i2c_client *client, unsigned cmd, void *arg) -{ - return v4l2_subdev_command(i2c_get_clientdata(client), cmd, arg); -} - /* ----------------------------------------------------------------------- */ static const struct v4l2_subdev_core_ops tvp5150_core_ops = { @@ -1194,10 +1191,11 @@ MODULE_DEVICE_TABLE(i2c, tvp5150_id); #endif static struct v4l2_i2c_driver_data v4l2_i2c_data = { .name = "tvp5150", - .command = tvp5150_command, .probe = tvp5150_probe, .remove = tvp5150_remove, +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 22) .legacy_class = I2C_CLASS_TV_ANALOG | I2C_CLASS_TV_DIGITAL, +#endif #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 26) .id_table = tvp5150_id, #endif |