summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2011-12-26 10:15:30 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2011-12-31 09:18:05 -0200
commit41943eaf15b1e18f3800e39d3356f409048c5d41 (patch)
treeec4d32991101e54ea5ca13691a2b9da637337ae8
parentd53b5102e3bb4a20ad63fbf16ff1638ea42d648d (diff)
downloadlinux-stable-41943eaf15b1e18f3800e39d3356f409048c5d41.tar.gz
linux-stable-41943eaf15b1e18f3800e39d3356f409048c5d41.tar.bz2
linux-stable-41943eaf15b1e18f3800e39d3356f409048c5d41.zip
[media] ec100: convert set_fontend to use DVBv5 parameters
Instead of using dvb_frontend_parameters struct, that were designed for a subset of the supported standards, use the DVBv5 cache information. Also, fill the supported delivery systems at dvb_frontend_ops struct. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r--drivers/media/dvb/frontends/ec100.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/drivers/media/dvb/frontends/ec100.c b/drivers/media/dvb/frontends/ec100.c
index 20decd704b8f..39e08112c5d1 100644
--- a/drivers/media/dvb/frontends/ec100.c
+++ b/drivers/media/dvb/frontends/ec100.c
@@ -76,15 +76,15 @@ static int ec100_read_reg(struct ec100_state *state, u8 reg, u8 *val)
return 0;
}
-static int ec100_set_frontend(struct dvb_frontend *fe,
- struct dvb_frontend_parameters *params)
+static int ec100_set_frontend(struct dvb_frontend *fe)
{
+ struct dtv_frontend_properties *c = &fe->dtv_property_cache;
struct ec100_state *state = fe->demodulator_priv;
int ret;
u8 tmp, tmp2;
- deb_info("%s: freq:%d bw:%d\n", __func__, params->frequency,
- params->u.ofdm.bandwidth);
+ deb_info("%s: freq:%d bw:%d\n", __func__, c->frequency,
+ c->bandwidth_hz);
/* program tuner */
if (fe->ops.tuner_ops.set_params)
@@ -108,16 +108,16 @@ static int ec100_set_frontend(struct dvb_frontend *fe,
B 0x1b | 0xb7 | 0x00 | 0x49
B 0x1c | 0x55 | 0x64 | 0x72 */
- switch (params->u.ofdm.bandwidth) {
- case BANDWIDTH_6_MHZ:
+ switch (c->bandwidth_hz) {
+ case 6000000:
tmp = 0xb7;
tmp2 = 0x55;
break;
- case BANDWIDTH_7_MHZ:
+ case 7000000:
tmp = 0x00;
tmp2 = 0x64;
break;
- case BANDWIDTH_8_MHZ:
+ case 8000000:
default:
tmp = 0x49;
tmp2 = 0x72;
@@ -306,6 +306,7 @@ error:
EXPORT_SYMBOL(ec100_attach);
static struct dvb_frontend_ops ec100_ops = {
+ .delsys = { SYS_DVBT },
.info = {
.name = "E3C EC100 DVB-T",
.type = FE_OFDM,
@@ -321,7 +322,7 @@ static struct dvb_frontend_ops ec100_ops = {
},
.release = ec100_release,
- .set_frontend_legacy = ec100_set_frontend,
+ .set_frontend = ec100_set_frontend,
.get_tune_settings = ec100_get_tune_settings,
.read_status = ec100_read_status,
.read_ber = ec100_read_ber,