From patchwork Sun Jul 23 10:13:09 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Scheller X-Patchwork-Id: 9858307 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 0F55C602B9 for ; Sun, 23 Jul 2017 10:13:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F381D28502 for ; Sun, 23 Jul 2017 10:13:25 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E631628500; Sun, 23 Jul 2017 10:13:25 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.5 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 867EE2850D for ; Sun, 23 Jul 2017 10:13:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751681AbdGWKNW (ORCPT ); Sun, 23 Jul 2017 06:13:22 -0400 Received: from mail-wm0-f66.google.com ([74.125.82.66]:33862 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751332AbdGWKNU (ORCPT ); Sun, 23 Jul 2017 06:13:20 -0400 Received: by mail-wm0-f66.google.com with SMTP id 79so1683931wmg.1 for ; Sun, 23 Jul 2017 03:13:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=TCDLYUXjXrOa2FtuLIMB4pIp99kRat9v6GUoen24RS0=; b=pPZ7h46JPZKAMWjcRpyexDMWXlY0IqKLSjfRYOoCXLZ1AO4IVK1Z2yVWYZtw9Lh0UI IMa4vqemSFIG/kiKdyBleN3AASQNhBHfIPIziaMebk69bEj6DXtrLvbJbKLxlWxzV7Ss nJ0unMDhItXeUtURwteeJMCaT4Fc95mrjc95KiFNf/WxoiTjN8EnkHiqyjL1cu8C6E34 gtaDaetnf3KkDpAQJVj0Ba9phq4iTolB8MfB2JE1RoR/4yPuJcoiaohnPk4SGWpRiAgW A3684iB1svHbh42FDoqzUlxnghUoW270MTUfbO4GDYyGfLHEVa7HFKj7+myBsnA5+z08 e45w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=TCDLYUXjXrOa2FtuLIMB4pIp99kRat9v6GUoen24RS0=; b=dnmHCGljhJKfc+jdpjmO2r68HtbTaLMXnEiFPzOpryGCiZ5BYDZiZK7Jobs1C5Kdh2 +cRex2EVjeNLIsYm4ckMxfuoAua0ZW8WRZZWdOw4Mg7gvnOENqvaR9kVbdxsCnNY/Ko1 5S5a7ZTark2Lgq2H3HVApRM81PQ6Rxy3OROnj2iFcyFN3LmLZSoey+NArf2kQ+c0dmvD sbkGx8rQR6p7rPN5BSLof14Nn33YU/W5zAhyM8GF3p33kc+jReb1ROhf79mFR7Xi7e19 DWmmlXml5leUlNTgIFLr0t9Aq8IXoti7L8nGS0iDl9Z84Om7cjgSw77ICDpsAe/nHT8/ Dd2Q== X-Gm-Message-State: AIVw113QDflvKma5u8KpuNfRBSMrev8eNEbSGcy34gm1E0GOY1XH6qL3 RzH/hbwU9OpCKfSc X-Received: by 10.28.46.3 with SMTP id u3mr2923649wmu.68.1500804798855; Sun, 23 Jul 2017 03:13:18 -0700 (PDT) Received: from dvbdev.wuest.de (ip-84-118-193-88.unity-media.net. [84.118.193.88]) by smtp.gmail.com with ESMTPSA id i67sm10905796wri.61.2017.07.23.03.13.18 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 23 Jul 2017 03:13:18 -0700 (PDT) From: Daniel Scheller To: linux-media@vger.kernel.org, mchehab@kernel.org, mchehab@s-opensource.com Cc: jasmin@anw.at, r.scobie@clear.net.nz Subject: [PATCH 1/7] [media] dvb-frontends/stv0910: fix STR assignment, remove unneeded var Date: Sun, 23 Jul 2017 12:13:09 +0200 Message-Id: <20170723101315.12523-2-d.scheller.oss@gmail.com> X-Mailer: git-send-email 2.13.0 In-Reply-To: <20170723101315.12523-1-d.scheller.oss@gmail.com> References: <20170723101315.12523-1-d.scheller.oss@gmail.com> Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Daniel Scheller According to the documentation, FE_SCALE_DECIBEL values should be assigned to .svalue and not .uvalue, so let's do this. While at it, remove the unneeded strength var from read_signal_strength(). Signed-off-by: Daniel Scheller --- drivers/media/dvb-frontends/stv0910.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/media/dvb-frontends/stv0910.c b/drivers/media/dvb-frontends/stv0910.c index bae1da3fdb2d..4084c142f1e4 100644 --- a/drivers/media/dvb-frontends/stv0910.c +++ b/drivers/media/dvb-frontends/stv0910.c @@ -1321,7 +1321,6 @@ static void read_signal_strength(struct dvb_frontend *fe) { struct stv *state = fe->demodulator_priv; struct dtv_frontend_properties *p = &state->fe.dtv_property_cache; - s64 strength; u8 reg[2]; u16 agc; s32 padc, power = 0; @@ -1341,10 +1340,8 @@ static void read_signal_strength(struct dvb_frontend *fe) padc = table_lookup(padc_lookup, ARRAY_SIZE(padc_lookup), power) + 352; - strength = (padc - agc); - p->strength.stat[0].scale = FE_SCALE_DECIBEL; - p->strength.stat[0].uvalue = strength; + p->strength.stat[0].svalue = (padc - agc); } static int read_status(struct dvb_frontend *fe, enum fe_status *status)