Get the proper bits from the TMCC table registers.

Signed-off-by: Mauro Carvalho Chehab <mche...@redhat.com>
---
 drivers/media/dvb-frontends/mb86a20s.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/drivers/media/dvb-frontends/mb86a20s.c 
b/drivers/media/dvb-frontends/mb86a20s.c
index e069c9b..d14824a 100644
--- a/drivers/media/dvb-frontends/mb86a20s.c
+++ b/drivers/media/dvb-frontends/mb86a20s.c
@@ -360,7 +360,7 @@ static int mb86a20s_get_modulation(struct mb86a20s_state 
*state,
        rc = mb86a20s_readreg(state, 0x6e);
        if (rc < 0)
                return rc;
-       switch ((rc & 0x70) >> 4) {
+       switch ((rc >> 4) & 0x07) {
        case 0:
                return DQPSK;
        case 1:
@@ -393,7 +393,7 @@ static int mb86a20s_get_fec(struct mb86a20s_state *state,
        rc = mb86a20s_readreg(state, 0x6e);
        if (rc < 0)
                return rc;
-       switch (rc) {
+       switch ((rc >> 4) & 0x07) {
        case 0:
                return FEC_1_2;
        case 1:
@@ -428,9 +428,7 @@ static int mb86a20s_get_interleaving(struct mb86a20s_state 
*state,
        rc = mb86a20s_readreg(state, 0x6e);
        if (rc < 0)
                return rc;
-       if (rc > 3)
-               return -EINVAL; /* Not used */
-       return rc;
+       return (rc >> 4) & 0x07;
 }
 
 static int mb86a20s_get_segment_count(struct mb86a20s_state *state,
-- 
1.7.11.7

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to