diff options
author | Mauro Carvalho Chehab <mchehab@redhat.com> | 2011-12-20 15:09:15 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2011-12-31 05:26:40 -0500 |
commit | 2676c258eb836caed508099e58030398217a5ef0 (patch) | |
tree | 8e9e3c19a326273f0e2a759844ee0006ed67f6f6 | |
parent | 8b80ff3ad52690d37e9617335ce9d66e6d4a92e5 (diff) |
[media] mt2060: remove fake implementaion of get_bandwidth()
This driver implements a fake get_bandwidth() callback. In
reallity, the tuner driver won't adjust its low-pass
filter based on a bandwidth, and were just providing a fake
method for demods to read whatever was "set".
This code is useless, as none of the drivers that use
this tuner seems to require a get_bandwidth() callback.
While here, convert set_params to use the DVBv5 way to pass
parameters to tuners.
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r-- | drivers/media/common/tuners/mt2060.c | 12 | ||||
-rw-r--r-- | drivers/media/common/tuners/mt2060_priv.h | 1 |
2 files changed, 2 insertions, 11 deletions
diff --git a/drivers/media/common/tuners/mt2060.c b/drivers/media/common/tuners/mt2060.c index 2ecaa53d1449..6fe2ef9f6259 100644 --- a/drivers/media/common/tuners/mt2060.c +++ b/drivers/media/common/tuners/mt2060.c | |||
@@ -155,6 +155,7 @@ static int mt2060_spurcheck(u32 lo1,u32 lo2,u32 if2) | |||
155 | 155 | ||
156 | static int mt2060_set_params(struct dvb_frontend *fe, struct dvb_frontend_parameters *params) | 156 | static int mt2060_set_params(struct dvb_frontend *fe, struct dvb_frontend_parameters *params) |
157 | { | 157 | { |
158 | struct dtv_frontend_properties *c = &fe->dtv_property_cache; | ||
158 | struct mt2060_priv *priv; | 159 | struct mt2060_priv *priv; |
159 | int ret=0; | 160 | int ret=0; |
160 | int i=0; | 161 | int i=0; |
@@ -176,8 +177,7 @@ static int mt2060_set_params(struct dvb_frontend *fe, struct dvb_frontend_parame | |||
176 | 177 | ||
177 | mt2060_writeregs(priv,b,2); | 178 | mt2060_writeregs(priv,b,2); |
178 | 179 | ||
179 | freq = params->frequency / 1000; // Hz -> kHz | 180 | freq = c->frequency / 1000; /* Hz -> kHz */ |
180 | priv->bandwidth = (fe->ops.info.type == FE_OFDM) ? params->u.ofdm.bandwidth : 0; | ||
181 | 181 | ||
182 | f_lo1 = freq + if1 * 1000; | 182 | f_lo1 = freq + if1 * 1000; |
183 | f_lo1 = (f_lo1 / 250) * 250; | 183 | f_lo1 = (f_lo1 / 250) * 250; |
@@ -293,13 +293,6 @@ static int mt2060_get_frequency(struct dvb_frontend *fe, u32 *frequency) | |||
293 | return 0; | 293 | return 0; |
294 | } | 294 | } |
295 | 295 | ||
296 | static int mt2060_get_bandwidth(struct dvb_frontend *fe, u32 *bandwidth) | ||
297 | { | ||
298 | struct mt2060_priv *priv = fe->tuner_priv; | ||
299 | *bandwidth = priv->bandwidth; | ||
300 | return 0; | ||
301 | } | ||
302 | |||
303 | static int mt2060_get_if_frequency(struct dvb_frontend *fe, u32 *frequency) | 296 | static int mt2060_get_if_frequency(struct dvb_frontend *fe, u32 *frequency) |
304 | { | 297 | { |
305 | *frequency = IF2 * 1000; | 298 | *frequency = IF2 * 1000; |
@@ -362,7 +355,6 @@ static const struct dvb_tuner_ops mt2060_tuner_ops = { | |||
362 | 355 | ||
363 | .set_params = mt2060_set_params, | 356 | .set_params = mt2060_set_params, |
364 | .get_frequency = mt2060_get_frequency, | 357 | .get_frequency = mt2060_get_frequency, |
365 | .get_bandwidth = mt2060_get_bandwidth, | ||
366 | .get_if_frequency = mt2060_get_if_frequency, | 358 | .get_if_frequency = mt2060_get_if_frequency, |
367 | }; | 359 | }; |
368 | 360 | ||
diff --git a/drivers/media/common/tuners/mt2060_priv.h b/drivers/media/common/tuners/mt2060_priv.h index 5eaccdefd0b0..2b60de6c707d 100644 --- a/drivers/media/common/tuners/mt2060_priv.h +++ b/drivers/media/common/tuners/mt2060_priv.h | |||
@@ -97,7 +97,6 @@ struct mt2060_priv { | |||
97 | struct i2c_adapter *i2c; | 97 | struct i2c_adapter *i2c; |
98 | 98 | ||
99 | u32 frequency; | 99 | u32 frequency; |
100 | u32 bandwidth; | ||
101 | u16 if1_freq; | 100 | u16 if1_freq; |
102 | u8 fmfreq; | 101 | u8 fmfreq; |
103 | }; | 102 | }; |