From 430e534136bd77613cd4c8dcb8e318b64b4ffaf6 Mon Sep 17 00:00:00 2001 From: Hans Verkuil Date: Mon, 30 Mar 2009 13:03:02 +0200 Subject: saa7191: tuner ops wasn't set. From: Hans Verkuil The tuner ops pointer wasn't set, so s_std never worked here. Priority: normal Signed-off-by: Hans Verkuil --- linux/drivers/media/video/saa7191.c | 1 + 1 file changed, 1 insertion(+) (limited to 'linux/drivers/media/video/saa7191.c') diff --git a/linux/drivers/media/video/saa7191.c b/linux/drivers/media/video/saa7191.c index 9df505e0f..0a14ab6db 100644 --- a/linux/drivers/media/video/saa7191.c +++ b/linux/drivers/media/video/saa7191.c @@ -603,6 +603,7 @@ static const struct v4l2_subdev_video_ops saa7191_video_ops = { static const struct v4l2_subdev_ops saa7191_ops = { .core = &saa7191_core_ops, .video = &saa7191_video_ops, + .tuner = &saa7191_tuner_ops, }; static int saa7191_probe(struct i2c_client *client, -- cgit v1.2.3 From 0811e7462ce5c70637faa77e010016680c1e971a Mon Sep 17 00:00:00 2001 From: Hans Verkuil Date: Wed, 1 Apr 2009 08:52:39 +0200 Subject: v4l2-subdev: move s_std from tuner to core. From: Hans Verkuil s_std didn't belong in the tuner ops. Stricly speaking it should be part of the video ops, but it is used by audio and tuner devices as well, so it is more efficient to make it part of the core ops. Priority: normal Signed-off-by: Hans Verkuil --- linux/drivers/media/video/saa7191.c | 4 ---- 1 file changed, 4 deletions(-) (limited to 'linux/drivers/media/video/saa7191.c') diff --git a/linux/drivers/media/video/saa7191.c b/linux/drivers/media/video/saa7191.c index 0a14ab6db..d78fa294a 100644 --- a/linux/drivers/media/video/saa7191.c +++ b/linux/drivers/media/video/saa7191.c @@ -588,9 +588,6 @@ static const struct v4l2_subdev_core_ops saa7191_core_ops = { .g_chip_ident = saa7191_g_chip_ident, .g_ctrl = saa7191_g_ctrl, .s_ctrl = saa7191_s_ctrl, -}; - -static const struct v4l2_subdev_tuner_ops saa7191_tuner_ops = { .s_std = saa7191_s_std, }; @@ -603,7 +600,6 @@ static const struct v4l2_subdev_video_ops saa7191_video_ops = { static const struct v4l2_subdev_ops saa7191_ops = { .core = &saa7191_core_ops, .video = &saa7191_video_ops, - .tuner = &saa7191_tuner_ops, }; static int saa7191_probe(struct i2c_client *client, -- cgit v1.2.3 From 1784ea5527ed756f946958f45f74d1f15797c366 Mon Sep 17 00:00:00 2001 From: Hans Verkuil Date: Mon, 30 Mar 2009 01:04:44 +0200 Subject: v4l2: use old-style i2c API for kernels < 2.6.26 instead of < 2.6.22 From: Hans Verkuil 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. Priority: normal Signed-off-by: Hans Verkuil --- linux/drivers/media/video/saa7191.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'linux/drivers/media/video/saa7191.c') diff --git a/linux/drivers/media/video/saa7191.c b/linux/drivers/media/video/saa7191.c index d78fa294a..f6a6b80b6 100644 --- a/linux/drivers/media/video/saa7191.c +++ b/linux/drivers/media/video/saa7191.c @@ -35,7 +35,7 @@ MODULE_VERSION(SAA7191_MODULE_VERSION); MODULE_AUTHOR("Mikael Nousiainen "); MODULE_LICENSE("GPL"); -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 22) +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 26) static unsigned short normal_i2c[] = { 0x8a >> 1, 0x8e >> 1, I2C_CLIENT_END }; I2C_CLIENT_INSMOD; -- cgit v1.2.3 From b4d23428b3c4456414ad8bf5e974757fd354a66f Mon Sep 17 00:00:00 2001 From: Hans Verkuil Date: Thu, 2 Apr 2009 16:26:22 +0200 Subject: v4l2-subdev: change s_routing prototype From: Hans Verkuil It is no longer needed to use a struct pointer as argument, since v4l2_subdev doesn't require that ioctl-like approach anymore. Instead just pass the input, output and config (new!) arguments directly. Priority: normal Signed-off-by: Hans Verkuil --- linux/drivers/media/video/saa7191.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'linux/drivers/media/video/saa7191.c') diff --git a/linux/drivers/media/video/saa7191.c b/linux/drivers/media/video/saa7191.c index f6a6b80b6..aa59776e1 100644 --- a/linux/drivers/media/video/saa7191.c +++ b/linux/drivers/media/video/saa7191.c @@ -166,14 +166,14 @@ static int saa7191_write_block(struct v4l2_subdev *sd, /* Helper functions */ static int saa7191_s_routing(struct v4l2_subdev *sd, - const struct v4l2_routing *route) + u32 input, u32 output, u32 config) { struct saa7191 *decoder = to_saa7191(sd); u8 luma = saa7191_read_reg(sd, SAA7191_REG_LUMA); u8 iock = saa7191_read_reg(sd, SAA7191_REG_IOCK); int err; - switch (route->input) { + switch (input) { case SAA7191_INPUT_COMPOSITE: /* Set Composite input */ iock &= ~(SAA7191_IOCK_CHRS | SAA7191_IOCK_GPSW1 | SAA7191_IOCK_GPSW2); @@ -196,7 +196,7 @@ static int saa7191_s_routing(struct v4l2_subdev *sd, if (err) return -EIO; - decoder->input = route->input; + decoder->input = input; return 0; } -- cgit v1.2.3