OSDN Git Service

media: dvb-frontends/stv0910: fix mask for scramblingcode setup
authorDaniel Scheller <d.scheller@gmx.net>
Sun, 20 Aug 2017 10:29:15 +0000 (06:29 -0400)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Sun, 20 Aug 2017 11:29:54 +0000 (07:29 -0400)
The scrambling code has 4 bits. Fix the mask accordingly.

Signed-off-by: Daniel Scheller <d.scheller@gmx.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
drivers/media/dvb-frontends/stv0910.c

index e87a3ee..d0a8ed3 100644 (file)
@@ -1021,7 +1021,7 @@ static int start(struct stv *state, struct dtv_frontend_properties *p)
                write_reg(state, RSTV0910_P2_PLROOT1 + state->regoff,
                          (scrambling_code >> 8) & 0xff);
                write_reg(state, RSTV0910_P2_PLROOT2 + state->regoff,
-                         (scrambling_code >> 16) & 0x07);
+                         (scrambling_code >> 16) & 0x0f);
                state->cur_scrambling_code = scrambling_code;
        }