[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>
This commit is contained in:
Michael Krufky 2011-04-16 13:22:10 -03:00 committed by Mauro Carvalho Chehab
parent 2578dfb7f7
commit f78028b68f

View File

@ -616,15 +616,15 @@ static int tda18271_rf_tracking_filters_init(struct dvb_frontend *fe, u32 freq)
map[i].rf1 = rf_freq[RF1] / 1000;
break;
case RF2:
dividend = (s32)(prog_cal[RF2] - prog_tab[RF2]) -
(s32)(prog_cal[RF1] + prog_tab[RF1]);
dividend = (s32)(prog_cal[RF2] - prog_tab[RF2] -
prog_cal[RF1] + prog_tab[RF1]);
divisor = (s32)(rf_freq[RF2] - rf_freq[RF1]) / 1000;
map[i].rf_a1 = (dividend / divisor);
map[i].rf2 = rf_freq[RF2] / 1000;
break;
case RF3:
dividend = (s32)(prog_cal[RF3] - prog_tab[RF3]) -
(s32)(prog_cal[RF2] + prog_tab[RF2]);
dividend = (s32)(prog_cal[RF3] - prog_tab[RF3] -
prog_cal[RF2] + prog_tab[RF2]);
divisor = (s32)(rf_freq[RF3] - rf_freq[RF2]) / 1000;
map[i].rf_a2 = (dividend / divisor);
map[i].rf_b2 = (s32)(prog_cal[RF2] - prog_tab[RF2]);