From patchwork Sat Jun 11 13:34:43 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans Verkuil X-Patchwork-Id: 871622 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter2.kernel.org (8.14.4/8.14.4) with ESMTP id p5BDZ2AC022825 for ; Sat, 11 Jun 2011 13:35:02 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757695Ab1FKNfA (ORCPT ); Sat, 11 Jun 2011 09:35:00 -0400 Received: from smtp-vbr18.xs4all.nl ([194.109.24.38]:2300 "EHLO smtp-vbr18.xs4all.nl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757689Ab1FKNe5 (ORCPT ); Sat, 11 Jun 2011 09:34:57 -0400 Received: from tschai.lan (215.80-203-102.nextgentel.com [80.203.102.215]) (authenticated bits=0) by smtp-vbr18.xs4all.nl (8.13.8/8.13.8) with ESMTP id p5BDYoGk064805 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 11 Jun 2011 15:34:55 +0200 (CEST) (envelope-from hverkuil@xs4all.nl) From: Hans Verkuil To: linux-media@vger.kernel.org Cc: Hans Verkuil Subject: [RFCv1 PATCH 7/7] tuner-core: s_tuner should not change tuner mode. Date: Sat, 11 Jun 2011 15:34:43 +0200 Message-Id: <2a85334a8d3f0861fc10f2d6adbf46946d12bb0e.1307798213.git.hans.verkuil@cisco.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1307799283-15518-1-git-send-email-hverkuil@xs4all.nl> References: <1307799283-15518-1-git-send-email-hverkuil@xs4all.nl> In-Reply-To: <9e1e782993aa0d0edf06fd5697743beca7717a53.1307798213.git.hans.verkuil@cisco.com> References: <9e1e782993aa0d0edf06fd5697743beca7717a53.1307798213.git.hans.verkuil@cisco.com> X-Virus-Scanned: by XS4ALL Virus Scanner Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter2.kernel.org [140.211.167.43]); Sat, 11 Jun 2011 13:35:03 +0000 (UTC) From: Hans Verkuil 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 --- 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; }