diff options
Diffstat (limited to 'linux/drivers/media/dvb/frontends/stv0297.c')
-rw-r--r-- | linux/drivers/media/dvb/frontends/stv0297.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/linux/drivers/media/dvb/frontends/stv0297.c b/linux/drivers/media/dvb/frontends/stv0297.c index cf5bfe290..3e34a3177 100644 --- a/linux/drivers/media/dvb/frontends/stv0297.c +++ b/linux/drivers/media/dvb/frontends/stv0297.c @@ -498,6 +498,7 @@ static int stv0297_set_frontend(struct dvb_frontend *fe, struct dvb_frontend_par int delay; int sweeprate; int carrieroffset; + int freq_off; unsigned long starttime; unsigned long timeout; fe_spectral_inversion_t inversion; @@ -684,7 +685,11 @@ static int stv0297_set_frontend(struct dvb_frontend *fe, struct dvb_frontend_par /* success!! */ stv0297_writereg_mask(state, 0x5a, 0x40, 0x00); - state->freq_off = stv0297_get_carrieroffset(state); + freq_off = stv0297_get_carrieroffset(state); + if (freq_off < 0) + freq_off = -freq_off; + if (freq_off <= 1500) + state->freq_off = freq_off; state->base_freq = p->frequency; return 0; |