summaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb/frontends
diff options
context:
space:
mode:
authorManu Abraham <abraham.manu@gmail.com>2009-04-08 20:24:53 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-06-16 18:20:39 -0300
commit5f99feffc0426f88db07e2d777d9dd4aa2205c2f (patch)
tree59bbf3ce39cf5b3febf30e940f505b5df5d06e8b /drivers/media/dvb/frontends
parentf430fff101dd2cdbf5db1cf274a1591ae2b6e05c (diff)
V4L/DVB (11590): stv090x: code simplification
Signed-off-by: Manu Abraham <manu@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/dvb/frontends')
-rw-r--r--drivers/media/dvb/frontends/stv090x.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/media/dvb/frontends/stv090x.c b/drivers/media/dvb/frontends/stv090x.c
index fee7917ec5c..b3a02790c9a 100644
--- a/drivers/media/dvb/frontends/stv090x.c
+++ b/drivers/media/dvb/frontends/stv090x.c
@@ -2351,19 +2351,16 @@ static enum stv090x_signal_state stv090x_get_sig_params(struct stv090x_state *st
static u32 stv090x_get_tmgoffst(struct stv090x_state *state, u32 srate)
{
s32 offst_tmg;
- s32 pow2;
offst_tmg = STV090x_READ_DEMOD(state, TMGREG2) << 16;
offst_tmg |= STV090x_READ_DEMOD(state, TMGREG1) << 8;
offst_tmg |= STV090x_READ_DEMOD(state, TMGREG0);
- pow2 = 1 << 24;
-
offst_tmg = comp2(offst_tmg, 24); /* 2's complement */
if (!offst_tmg)
offst_tmg = 1;
- offst_tmg = ((s32) srate * 10) / (pow2 / offst_tmg);
+ offst_tmg = ((s32) srate * 10) / ((s32) 0x1000000 / offst_tmg);
offst_tmg /= 320;
return offst_tmg;