diff options
author | Jean-Francois Moine <moinejf@free.fr> | 2009-04-05 18:03:02 +0200 |
---|---|---|
committer | Jean-Francois Moine <moinejf@free.fr> | 2009-04-05 18:03:02 +0200 |
commit | bcaafb56e4c3741c1923db37683a4590dda2cbfb (patch) | |
tree | 4ade810f7cbd3425665c1ce57769745871565866 /linux/drivers/media/video/cs5345.c | |
parent | ffa071fb6b99731b41db5e814dbb2b0403c7c98c (diff) | |
parent | 8dd3ceb79cec4a833fbc9fd654b7e71e9548d331 (diff) | |
download | mediapointer-dvb-s2-bcaafb56e4c3741c1923db37683a4590dda2cbfb.tar.gz mediapointer-dvb-s2-bcaafb56e4c3741c1923db37683a4590dda2cbfb.tar.bz2 |
merge: v4l-dvb
Diffstat (limited to 'linux/drivers/media/video/cs5345.c')
-rw-r--r-- | linux/drivers/media/video/cs5345.c | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/linux/drivers/media/video/cs5345.c b/linux/drivers/media/video/cs5345.c index 31d6c4aa4..84e7cb967 100644 --- a/linux/drivers/media/video/cs5345.c +++ b/linux/drivers/media/video/cs5345.c @@ -37,7 +37,7 @@ module_param(debug, bool, 0644); MODULE_PARM_DESC(debug, "Debugging messages, 0=Off (default), 1=On"); -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 22) +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 26) static unsigned short normal_i2c[] = { 0x98 >> 1, I2C_CLIENT_END }; I2C_CLIENT_INSMOD; @@ -59,14 +59,15 @@ static inline int cs5345_read(struct v4l2_subdev *sd, u8 reg) return i2c_smbus_read_byte_data(client, reg); } -static int cs5345_s_routing(struct v4l2_subdev *sd, const struct v4l2_routing *route) +static int cs5345_s_routing(struct v4l2_subdev *sd, + u32 input, u32 output, u32 config) { - if ((route->input & 0xf) > 6) { - v4l2_err(sd, "Invalid input %d.\n", route->input); + if ((input & 0xf) > 6) { + v4l2_err(sd, "Invalid input %d.\n", input); return -EINVAL; } - cs5345_write(sd, 0x09, route->input & 0xf); - cs5345_write(sd, 0x05, route->input & 0xf0); + cs5345_write(sd, 0x09, input & 0xf); + cs5345_write(sd, 0x05, input & 0xf0); return 0; } @@ -147,11 +148,6 @@ static int cs5345_log_status(struct v4l2_subdev *sd) return 0; } -static int cs5345_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 cs5345_core_ops = { @@ -222,8 +218,6 @@ MODULE_DEVICE_TABLE(i2c, cs5345_id); #endif static struct v4l2_i2c_driver_data v4l2_i2c_data = { .name = "cs5345", - .driverid = I2C_DRIVERID_CS5345, - .command = cs5345_command, .probe = cs5345_probe, .remove = cs5345_remove, #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 26) |