From patchwork Thu Apr 25 19:07:59 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mauro Carvalho Chehab X-Patchwork-Id: 2489741 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 60DED3FD85 for ; Thu, 25 Apr 2013 19:08:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758343Ab3DYTIJ (ORCPT ); Thu, 25 Apr 2013 15:08:09 -0400 Received: from mx1.redhat.com ([209.132.183.28]:55008 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758720Ab3DYTIH (ORCPT ); Thu, 25 Apr 2013 15:08:07 -0400 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r3PJ87dl011814 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 25 Apr 2013 15:08:07 -0400 Received: from pedra (vpn1-7-199.gru2.redhat.com [10.97.7.199]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r3PJ840v020272 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 25 Apr 2013 15:08:06 -0400 Received: from v4l by pedra with local (Exim 4.80.1) (envelope-from ) id 1UVRWV-0000x5-Lu; Thu, 25 Apr 2013 16:08:03 -0300 From: Mauro Carvalho Chehab Cc: Mauro Carvalho Chehab , Linux Media Mailing List Subject: [PATCH 1/4] [media] r820t: Remove a warning for an unused value Date: Thu, 25 Apr 2013 16:07:59 -0300 Message-Id: <1366916882-3565-1-git-send-email-mchehab@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 To: unlisted-recipients:; (no To-header on input) Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Currently, the driver complains about the pre_detect var: drivers/media/tuners/r820t.c: In function 'r820t_sysfreq_sel': drivers/media/tuners/r820t.c:722:31: warning: variable 'pre_dect' set but not used [-Wunused-but-set-variable] While rtl8232 code comments it, perhaps some other driver may use. So, the better is to keep the code there, allowing to enable it via r820t config data. Signed-off-by: Mauro Carvalho Chehab --- drivers/media/tuners/r820t.c | 7 +++++++ drivers/media/tuners/r820t.h | 1 + 2 files changed, 8 insertions(+) diff --git a/drivers/media/tuners/r820t.c b/drivers/media/tuners/r820t.c index e6e7a06..4835021 100644 --- a/drivers/media/tuners/r820t.c +++ b/drivers/media/tuners/r820t.c @@ -797,6 +797,13 @@ static int r820t_sysfreq_sel(struct r820t_priv *priv, u32 freq, cable2_in = 0x00; } + + if (priv->cfg->use_predetect) { + rc = r820t_write_reg_mask(priv, 0x06, pre_dect, 0x40); + if (rc < 0) + return rc; + } + rc = r820t_write_reg_mask(priv, 0x1d, lna_top, 0xc7); if (rc < 0) return rc; diff --git a/drivers/media/tuners/r820t.h b/drivers/media/tuners/r820t.h index 4c0823b..48af354 100644 --- a/drivers/media/tuners/r820t.h +++ b/drivers/media/tuners/r820t.h @@ -39,6 +39,7 @@ struct r820t_config { enum r820t_chip rafael_chip; unsigned max_i2c_msg_len; bool use_diplexer; + bool use_predetect; }; #if IS_ENABLED(CONFIG_MEDIA_TUNER_R820T)