aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Krufky <mkrufky@kernellabs.com>2011-04-16 12:22:10 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2011-04-19 10:30:33 -0400
commitf78028b68f01925b826979627a2498111ea11bed (patch)
treee05dd0f6aa86f99442268aa0825f0925c82d64fb
parent2578dfb7f767076baf04eaf5fbf35a75afb9a1a7 (diff)
[media] tda18271: fix calculation bug in tda18271_rf_tracking_filters_init
Misplaced parenthesis cause a calculation bug in tda18271_rf_tracking_filters_init 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>
-rw-r--r--drivers/media/common/tuners/tda18271-fe.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/media/common/tuners/tda18271-fe.c b/drivers/media/common/tuners/tda18271-fe.c
index 9ad4454a148d..42105d1c8613 100644
--- a/drivers/media/common/tuners/tda18271-fe.c
+++ b/drivers/media/common/tuners/tda18271-fe.c
@@ -616,15 +616,15 @@ static int tda18271_rf_tracking_filters_init(struct dvb_frontend *fe, u32 freq)
616 map[i].rf1 = rf_freq[RF1] / 1000; 616 map[i].rf1 = rf_freq[RF1] / 1000;
617 break; 617 break;
618 case RF2: 618 case RF2:
619 dividend = (s32)(prog_cal[RF2] - prog_tab[RF2]) - 619 dividend = (s32)(prog_cal[RF2] - prog_tab[RF2] -
620 (s32)(prog_cal[RF1] + prog_tab[RF1]); 620 prog_cal[RF1] + prog_tab[RF1]);
621 divisor = (s32)(rf_freq[RF2] - rf_freq[RF1]) / 1000; 621 divisor = (s32)(rf_freq[RF2] - rf_freq[RF1]) / 1000;
622 map[i].rf_a1 = (dividend / divisor); 622 map[i].rf_a1 = (dividend / divisor);
623 map[i].rf2 = rf_freq[RF2] / 1000; 623 map[i].rf2 = rf_freq[RF2] / 1000;
624 break; 624 break;
625 case RF3: 625 case RF3:
626 dividend = (s32)(prog_cal[RF3] - prog_tab[RF3]) - 626 dividend = (s32)(prog_cal[RF3] - prog_tab[RF3] -
627 (s32)(prog_cal[RF2] + prog_tab[RF2]); 627 prog_cal[RF2] + prog_tab[RF2]);
628 divisor = (s32)(rf_freq[RF3] - rf_freq[RF2]) / 1000; 628 divisor = (s32)(rf_freq[RF3] - rf_freq[RF2]) / 1000;
629 map[i].rf_a2 = (dividend / divisor); 629 map[i].rf_a2 = (dividend / divisor);
630 map[i].rf_b2 = (s32)(prog_cal[RF2] - prog_tab[RF2]); 630 map[i].rf_b2 = (s32)(prog_cal[RF2] - prog_tab[RF2]);