From patchwork Sun Jun 25 11:26:46 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Scheller X-Patchwork-Id: 9808111 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 6A0166038C for ; Sun, 25 Jun 2017 11:26:59 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5AFC5271CB for ; Sun, 25 Jun 2017 11:26:59 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 42EC7286E1; Sun, 25 Jun 2017 11:26:59 +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 E5D4A285DC for ; Sun, 25 Jun 2017 11:26:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751208AbdFYL0z (ORCPT ); Sun, 25 Jun 2017 07:26:55 -0400 Received: from mail-wr0-f196.google.com ([209.85.128.196]:34505 "EHLO mail-wr0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751066AbdFYL0x (ORCPT ); Sun, 25 Jun 2017 07:26:53 -0400 Received: by mail-wr0-f196.google.com with SMTP id k67so23865428wrc.1 for ; Sun, 25 Jun 2017 04:26:53 -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=6wdwNFg8iIaTTL5CWS34HPNxE5tWRg4B+QS7PNFe0yY=; b=csDD28Uyk0CaIEaZtzW4B3Gz4eLOKS4fePtZiMUX5ghunWPNv2Sz2L72yt4Jvt2uh+ bXC0dU7Qzmk5z+tpAPcMNfeT3CSPYKsREdEIrcYf8I3+8+gLnofkDFH+CWZFfzrCKtqJ 5ifVrpM2J1Xt6pIlPBvK/dSWXnHxgSwzJZXoqSrsEspnEFKUYta7XKsMsu+Ae3Spc8ki mijLlz9xCV4o09IYdtDiBeZtGkPxQ8oDqZ9MCXvhEG68UPXphfgFIQx6j8o8ST9hVwxA APVQT7FmmR/2kZNOtqfpi4AP8R9h0jMJ+TtnJXxpRc3g92axXAlTIvsfJ+1CbWOK2YqF cwmQ== 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=6wdwNFg8iIaTTL5CWS34HPNxE5tWRg4B+QS7PNFe0yY=; b=NUtchqiGmIjxcB5rHy2yoKwqwAxRKd6KCYSXWgjU8RUrgX8jXLFKHNOeCuHhZZ0DIi 6TXVFB6RluIwMHtb1QHvd2ADpnDwdNkderDLaLoHj48nCVWPa8v6sbEf+V63OVnA+i11 3Rsj3dnZIXdOdWg2/iVdzlj7ZK5L+5GMfu6IXDaSBiheuBSJiEkHAlAIHLZt4rW4gGPd 7mavrEQNkmo7wdBCVnsb2tyHR8VhSqwBpFteVwdH9sOSs2D71vEza6bHC2ErqyuCgpM0 qj5lFYnb/vR+mrmBkVSNIkiUjm7mCMKZTxK7Zhlr/e3evHrUqmWnTiT75a7ZjqLfGFzf Kcfw== X-Gm-Message-State: AKS2vOySZvhjOX1JByO4eKbR2/WCtWojB/Bprgqeps1nN/IiwZu21qda NWc2Wxsdtn6vJ7L4 X-Received: by 10.223.151.216 with SMTP id t24mr11422779wrb.40.1498390012155; Sun, 25 Jun 2017 04:26:52 -0700 (PDT) Received: from dvbdev.wuest.de (ip-37-24-178-151.hsi14.unitymediagroup.de. [37.24.178.151]) by smtp.gmail.com with ESMTPSA id b131sm9896099wma.11.2017.06.25.04.26.51 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 25 Jun 2017 04:26:51 -0700 (PDT) From: Daniel Scheller To: linux-media@vger.kernel.org, mchehab@kernel.org, mchehab@s-opensource.com Cc: liplianin@netup.ru, rjkm@metzlerbros.de, crope@iki.fi Subject: [PATCH v3 4/4] [media] dvb-frontends/stv0367: update UCB readout condition logic Date: Sun, 25 Jun 2017 13:26:46 +0200 Message-Id: <20170625112646.7973-5-d.scheller.oss@gmail.com> X-Mailer: git-send-email 2.13.0 In-Reply-To: <20170625112646.7973-1-d.scheller.oss@gmail.com> References: <20170625112646.7973-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 Since the other statistics are read when fe_status conditions are TRUE, change the ucblocks readout logic to match this aswell. Signed-off-by: Daniel Scheller --- drivers/media/dvb-frontends/stv0367.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/drivers/media/dvb-frontends/stv0367.c b/drivers/media/dvb-frontends/stv0367.c index 6097752a93bc..18ad1488be48 100644 --- a/drivers/media/dvb-frontends/stv0367.c +++ b/drivers/media/dvb-frontends/stv0367.c @@ -3113,13 +3113,11 @@ static int stv0367ddb_read_status(struct dvb_frontend *fe, else p->cnr.stat[0].scale = FE_SCALE_NOT_AVAILABLE; - /* stop if demod isn't locked */ - if (!(*status & FE_HAS_LOCK)) { + /* read uncorrected blocks on FE_HAS_LOCK */ + if (*status & FE_HAS_LOCK) + stv0367ddb_read_ucblocks(fe); + else p->block_error.stat[0].scale = FE_SCALE_NOT_AVAILABLE; - return ret; - } - - stv0367ddb_read_ucblocks(fe); return 0; }