From patchwork Tue Mar 27 15:51:21 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Akihiro TSUKADA X-Patchwork-Id: 10310519 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 640D560212 for ; Tue, 27 Mar 2018 15:54:27 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 54A4328F07 for ; Tue, 27 Mar 2018 15:54:27 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 451172991D; Tue, 27 Mar 2018 15:54:27 +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=-7.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_HI 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 C8B6729E2A for ; Tue, 27 Mar 2018 15:51:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752311AbeC0Pvl (ORCPT ); Tue, 27 Mar 2018 11:51:41 -0400 Received: from mail-pl0-f68.google.com ([209.85.160.68]:40426 "EHLO mail-pl0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751486AbeC0Pvk (ORCPT ); Tue, 27 Mar 2018 11:51:40 -0400 Received: by mail-pl0-f68.google.com with SMTP id x4-v6so14333221pln.7 for ; Tue, 27 Mar 2018 08:51:40 -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; bh=O0xVpVAjTprM3WoT9UX0CGn5EwlPyLmDdLAyrDTBD6c=; b=uM+40nrfgXr0O2rmBhmG7Ce1oUOXJ9ycVP2HQp3LmmELoB0TGj0e2R2hFOwIp+a3fx ZVkElDVPvIa0j96R07fkFWnqjiaIFKsL2z4zrdfO0BlKVKYji3QL1Tf4gtjyX3w5jT6X arxRtS5wO/wc5SjCXkmj8AR6/RmjGV2hHJxkdR4hUTKMrqHFsC1rgQOaSOSx/lY9jYy6 ZxUUSJTUabjSO5AY4ByGr85MGADiwlkoWyP0DQFhfvQaVcumdV/h+vV3rV+AXyQe+ufR UX22/I4jWdSCxS9F01t8TyRCqKHSAcfcfvhEKGtWIOJ5UJW31VhQR/t3bfiXuaZ8tE3U CkNA== 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; bh=O0xVpVAjTprM3WoT9UX0CGn5EwlPyLmDdLAyrDTBD6c=; b=RMErRJJHMGAPZ+K/UgVyelHN3HZsRbDrQ4Y4zM+yotiJyeQZCoSZtN18QtCKIM1QNj +nwKuIEzLvKdVrl6vKYhm0GhIRqMoLEIn1kqwWJ64XPrX/Z4+JoN3LbhS6HWqSIHj+gw moGKct2wk2JILWjtdPWJlo9dZRgGFgVs6v3iCN4KO4ylmXe44vIXFENhoipfgAMKitE4 Lc3jM3bI6L05WCmNZPJjv/ar1DYE1ysc90NcWO9YX2fVDUk6u1u/nMzXnf/y2OKQ8Ywq ZYiiGdbRVYIE8phMwN+jKayBsLwp1wn8CYQpSIil1Up3ZD6jFSV6qJWpsQnJKBJ0iSlp Rz4A== X-Gm-Message-State: AElRT7HtabjsRaYHT6k9Jm0o4hjcGVLCreqdOzXYn0wJfN6FHwxJtife 4rZeSfloRzX/z206WhAw9KKzNQ== X-Google-Smtp-Source: AG47ELutBOaIRT+MaUzg1xHbQJ9lWIYAWdxbFRx8WpzIA+OBTyUChxUZbJyTkdQOCYaJH6TeQujbpA== X-Received: by 2002:a17:902:6085:: with SMTP id s5-v6mr42497186plj.307.1522165899481; Tue, 27 Mar 2018 08:51:39 -0700 (PDT) Received: from localhost.localdomain (softbank219203027033.bbtec.net. [219.203.27.33]) by smtp.googlemail.com with ESMTPSA id s17sm4058053pfk.105.2018.03.27.08.51.37 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 27 Mar 2018 08:51:38 -0700 (PDT) From: tskd08@gmail.com To: linux-media@vger.kernel.org Cc: mchehab@s-opensource.com, Akihiro Tsukada Subject: [PATCH] dvb-frontends/tc90522: fix bit shift mistakes Date: Wed, 28 Mar 2018 00:51:21 +0900 Message-Id: <20180327155121.13110-1-tskd08@gmail.com> X-Mailer: git-send-email 2.16.3 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: Akihiro Tsukada they were obviously wrong. Signed-off-by: Akihiro Tsukada --- drivers/media/dvb-frontends/tc90522.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/media/dvb-frontends/tc90522.c b/drivers/media/dvb-frontends/tc90522.c index 5572b39614d..04fb4922332 100644 --- a/drivers/media/dvb-frontends/tc90522.c +++ b/drivers/media/dvb-frontends/tc90522.c @@ -352,7 +352,7 @@ static int tc90522t_get_frontend(struct dvb_frontend *fe, mode = 1; ret = reg_read(state, 0xb0, val, 1); if (ret == 0) { - mode = (val[0] & 0xc0) >> 2; + mode = (val[0] & 0xc0) >> 6; c->transmission_mode = tm_conv[mode]; c->guard_interval = (val[0] & 0x30) >> 4; } @@ -379,7 +379,7 @@ static int tc90522t_get_frontend(struct dvb_frontend *fe, } /* layer B */ - v = (val[3] & 0x03) << 1 | (val[4] & 0xc0) >> 6; + v = (val[3] & 0x03) << 2 | (val[4] & 0xc0) >> 6; if (v == 0x0f) c->layer[1].segment_count = 0; else {