summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--linux/drivers/media/dvb/dvb-core/dvb_frontend.c19
1 files changed, 13 insertions, 6 deletions
diff --git a/linux/drivers/media/dvb/dvb-core/dvb_frontend.c b/linux/drivers/media/dvb/dvb-core/dvb_frontend.c
index 8a6d2b79f..f64279a04 100644
--- a/linux/drivers/media/dvb/dvb-core/dvb_frontend.c
+++ b/linux/drivers/media/dvb/dvb-core/dvb_frontend.c
@@ -140,7 +140,7 @@ void dvb_bend_frequency (struct dvb_frontend_data *this_fe, int recursive)
{
struct list_head *entry;
int stepsize = this_fe->info->frequency_stepsize;
- int frequency = this_fe->parameters.frequency + this_fe->lnb_drift;
+ int frequency;
if (!stepsize || recursive > 10) {
printk ("%s: too deep recursion, check frequency_stepsize "
@@ -162,15 +162,22 @@ void dvb_bend_frequency (struct dvb_frontend_data *this_fe, int recursive)
fe = list_entry (entry, struct dvb_frontend_data, list_head);
- f = fe->parameters.frequency + fe->lnb_drift + fe->bending;
-
+ f = fe->parameters.frequency;
+ f += fe->lnb_drift;
+ f += fe->bending;
+
+ frequency = this_fe->parameters.frequency;
+ frequency += this_fe->lnb_drift;
+ frequency += this_fe->bending;
+
if (this_fe != fe &&
- frequency >= f - stepsize && frequency <= f + stepsize)
+ frequency > f - stepsize && frequency < f + stepsize)
{
- if (recursive % 2 == 0)
+ if (recursive % 2)
this_fe->bending += stepsize;
else
this_fe->bending = -this_fe->bending;
+
dvb_bend_frequency (this_fe, recursive + 1);
goto done;
}
@@ -504,7 +511,7 @@ int dvb_frontend_thread (void *data)
fe->lost_sync_count = 0;
} else {
fe->lost_sync_count++;
-printk ("%s: no sync, lost_sync_count %i\n", __FUNCTION__, fe->lost_sync_count);
+
dvb_frontend_recover (fe);
delay = HZ/5;
if (jiffies - fe->lost_sync_jiffies > TIMEOUT) {