]> git.openfabrics.org - ~shefty/rdma-dev.git/commitdiff
[media] tda18271: fix bad calculation of main post divider byte
authorMichael Krufky <mkrufky@kernellabs.com>
Sat, 16 Apr 2011 16:22:10 +0000 (13:22 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Tue, 19 Apr 2011 14:32:44 +0000 (11:32 -0300)
R_MPD bit 3 does not depend on analog vs. digital. Just use
(0x7f & pd) directly from the values in the main pll table.

Thanks to Stefan Sibiga for pointing this out.

Cc: Stefan Sibiga <stefansibiga@yahoo.ca>
Signed-off-by: Michael Krufky <mkrufky@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/common/tuners/tda18271-common.c

index 5466d47db899ea67c8551fafbe2a5e5bacb78ba7..aae40e52af5b1f3edf36c11154b6d04e41fd8273 100644 (file)
@@ -533,16 +533,7 @@ int tda18271_calc_main_pll(struct dvb_frontend *fe, u32 freq)
        if (tda_fail(ret))
                goto fail;
 
-       regs[R_MPD]   = (0x77 & pd);
-
-       switch (priv->mode) {
-       case TDA18271_ANALOG:
-               regs[R_MPD]  &= ~0x08;
-               break;
-       case TDA18271_DIGITAL:
-               regs[R_MPD]  |=  0x08;
-               break;
-       }
+       regs[R_MPD]   = (0x7f & pd);
 
        div =  ((d * (freq / 1000)) << 7) / 125;