diff mbox

[RFCv1,6/7] tuner-core: fix g_tuner

Message ID 54ea5935863e922ac5b9e5faf61d9b69e4f31492.1307798213.git.hans.verkuil@cisco.com (mailing list archive)
State RFC
Headers show

Commit Message

Hans Verkuil June 11, 2011, 1:34 p.m. UTC
From: Hans Verkuil <hans.verkuil@cisco.com>

g_tuner just returns the tuner data for the current tuner mode and the
application does not have to set the tuner type. So don't test for a
valid tuner type.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
---
 drivers/media/video/tuner-core.c |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)

Comments

Mauro Carvalho Chehab June 11, 2011, 1:48 p.m. UTC | #1
Em 11-06-2011 10:34, Hans Verkuil escreveu:
> From: Hans Verkuil <hans.verkuil@cisco.com>
> 
> g_tuner just returns the tuner data for the current tuner mode and the
> application does not have to set the tuner type. So don't test for a
> valid tuner type.

This also breaks support for a separate radio tuner, as both TV and radio
tuners will touch at the g_tuner struct.

> 
> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
> ---
>  drivers/media/video/tuner-core.c |    2 --
>  1 files changed, 0 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/media/video/tuner-core.c b/drivers/media/video/tuner-core.c
> index 8ef7790..7280998 100644
> --- a/drivers/media/video/tuner-core.c
> +++ b/drivers/media/video/tuner-core.c
> @@ -1120,8 +1120,6 @@ static int tuner_g_tuner(struct v4l2_subdev *sd, struct v4l2_tuner *vt)
>  	struct analog_demod_ops *analog_ops = &t->fe.ops.analog_ops;
>  	struct dvb_tuner_ops *fe_tuner_ops = &t->fe.ops.tuner_ops;
>  
> -	if (!supported_mode(t, vt->type))
> -		return 0;
>  	vt->type = t->mode;
>  	if (analog_ops->get_afc)
>  		vt->afc = analog_ops->get_afc(&t->fe);

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/media/video/tuner-core.c b/drivers/media/video/tuner-core.c
index 8ef7790..7280998 100644
--- a/drivers/media/video/tuner-core.c
+++ b/drivers/media/video/tuner-core.c
@@ -1120,8 +1120,6 @@  static int tuner_g_tuner(struct v4l2_subdev *sd, struct v4l2_tuner *vt)
 	struct analog_demod_ops *analog_ops = &t->fe.ops.analog_ops;
 	struct dvb_tuner_ops *fe_tuner_ops = &t->fe.ops.tuner_ops;
 
-	if (!supported_mode(t, vt->type))
-		return 0;
 	vt->type = t->mode;
 	if (analog_ops->get_afc)
 		vt->afc = analog_ops->get_afc(&t->fe);