All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] dvb-frontends/tc90522: fix bit shift mistakes
@ 2018-03-27 15:51 tskd08
  0 siblings, 0 replies; only message in thread
From: tskd08 @ 2018-03-27 15:51 UTC (permalink / raw)
  To: linux-media; +Cc: mchehab, Akihiro Tsukada

From: Akihiro Tsukada <tskd08@gmail.com>

they were obviously wrong.

Signed-off-by: Akihiro Tsukada <tskd08@gmail.com>
---
 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 {
-- 
2.16.3

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2018-03-27 15:51 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-03-27 15:51 [PATCH] dvb-frontends/tc90522: fix bit shift mistakes tskd08

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.