From: Hans Verkuil <hans.verk...@cisco.com>

According to the spec the tuner type field is not used when calling
S_TUNER: index, audmode and reserved are the only writable fields.

So remove the type check. Instead, just set the audmode if the current
tuner mode is set to radio.

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

diff --git a/drivers/media/video/tuner-core.c b/drivers/media/video/tuner-core.c
index 7280998..0ffcf54 100644
--- a/drivers/media/video/tuner-core.c
+++ b/drivers/media/video/tuner-core.c
@@ -1156,12 +1156,10 @@ static int tuner_s_tuner(struct v4l2_subdev *sd, struct 
v4l2_tuner *vt)
 {
        struct tuner *t = to_tuner(sd);
 
-       if (!set_mode(t, vt->type))
-               return 0;
-
-       if (t->mode == V4L2_TUNER_RADIO)
+       if (t->mode == V4L2_TUNER_RADIO) {
                t->audmode = vt->audmode;
-       set_freq(t, 0);
+               set_freq(t, 0);
+       }
 
        return 0;
 }
-- 
1.7.1

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

Reply via email to