From patchwork Sat Jun 11 13:34:39 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans Verkuil X-Patchwork-Id: 871632 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.4) with ESMTP id p5BDZ6GY014109 for ; Sat, 11 Jun 2011 13:35:06 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757767Ab1FKNe6 (ORCPT ); Sat, 11 Jun 2011 09:34:58 -0400 Received: from smtp-vbr18.xs4all.nl ([194.109.24.38]:4733 "EHLO smtp-vbr18.xs4all.nl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757264Ab1FKNez (ORCPT ); Sat, 11 Jun 2011 09:34:55 -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 p5BDYoGg064805 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 11 Jun 2011 15:34:53 +0200 (CEST) (envelope-from hverkuil@xs4all.nl) From: Hans Verkuil To: linux-media@vger.kernel.org Cc: Hans Verkuil Subject: [RFCv1 PATCH 3/7] tuner-core: fix g_frequency support. Date: Sat, 11 Jun 2011 15:34:39 +0200 Message-Id: <0d7f8cae6d252df04dbbcc6515507a9f7e00b895.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 (demeter1.kernel.org [140.211.167.41]); Sat, 11 Jun 2011 13:35:06 +0000 (UTC) From: Hans Verkuil VIDIOC_G_FREQUENCY should not check the tuner type, instead that is something the driver fill in. Since apps will often leave the type at 0, the 'supported_mode' call will return false and the frequency never gets filled in. Remove this check. Signed-off-by: Hans Verkuil --- 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 ee43e0a..4d8dcea 100644 --- a/drivers/media/video/tuner-core.c +++ b/drivers/media/video/tuner-core.c @@ -1132,8 +1132,6 @@ static int tuner_g_frequency(struct v4l2_subdev *sd, struct v4l2_frequency *f) struct tuner *t = to_tuner(sd); struct dvb_tuner_ops *fe_tuner_ops = &t->fe.ops.tuner_ops; - if (!supported_mode(t, f->type)) - return 0; f->type = t->mode; if (fe_tuner_ops->get_frequency && !t->standby) { u32 abs_freq;