summaryrefslogtreecommitdiffstats
path: root/drivers/media/common/tuners/tda827x.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2011-12-27 00:02:28 +0100
committerMauro Carvalho Chehab <mchehab@redhat.com>2011-12-31 13:22:49 +0100
commitc6f56e7d794cba022353d464dfa3383d1b3e0125 (patch)
tree54414d0810e4f465a4107925092f8219695a3341 /drivers/media/common/tuners/tda827x.c
parent[media] dvb-core: don't use fe_bandwidth_t on driver (diff)
downloadlinux-c6f56e7d794cba022353d464dfa3383d1b3e0125.tar.xz
linux-c6f56e7d794cba022353d464dfa3383d1b3e0125.zip
[media] dvb: don't use DVBv3 bandwidth macros
Every frontend now uses DVBv5 way. So, let's not use the DVBv3 macros internally anymore. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/common/tuners/tda827x.c')
-rw-r--r--drivers/media/common/tuners/tda827x.c14
1 files changed, 2 insertions, 12 deletions
diff --git a/drivers/media/common/tuners/tda827x.c b/drivers/media/common/tuners/tda827x.c
index d96d0b9e1899..e180def0a657 100644
--- a/drivers/media/common/tuners/tda827x.c
+++ b/drivers/media/common/tuners/tda827x.c
@@ -158,7 +158,6 @@ static int tda827xo_set_params(struct dvb_frontend *fe)
struct tda827x_priv *priv = fe->tuner_priv;
u8 buf[14];
int rc;
- u32 band;
struct i2c_msg msg = { .addr = priv->i2c_addr, .flags = 0,
.buf = buf, .len = sizeof(buf) };
@@ -168,16 +167,12 @@ static int tda827xo_set_params(struct dvb_frontend *fe)
dprintk("%s:\n", __func__);
if (c->bandwidth_hz == 0) {
if_freq = 5000000;
- band = BANDWIDTH_8_MHZ;
} else if (c->bandwidth_hz <= 6000000) {
if_freq = 4000000;
- band = BANDWIDTH_6_MHZ;
} else if (c->bandwidth_hz <= 7000000) {
if_freq = 4500000;
- band = BANDWIDTH_7_MHZ;
} else { /* 8 MHz */
if_freq = 5000000;
- band = BANDWIDTH_8_MHZ;
}
tuner_freq = c->frequency;
@@ -224,7 +219,7 @@ static int tda827xo_set_params(struct dvb_frontend *fe)
goto err;
priv->frequency = c->frequency;
- priv->bandwidth = band;
+ priv->bandwidth = c->bandwidth_hz;
return 0;
@@ -522,7 +517,6 @@ static int tda827xa_set_params(struct dvb_frontend *fe)
struct tda827x_priv *priv = fe->tuner_priv;
struct tda827xa_data *frequency_map = tda827xa_dvbt;
u8 buf[11];
- u32 band;
struct i2c_msg msg = { .addr = priv->i2c_addr, .flags = 0,
.buf = buf, .len = sizeof(buf) };
@@ -537,16 +531,12 @@ static int tda827xa_set_params(struct dvb_frontend *fe)
if (c->bandwidth_hz == 0) {
if_freq = 5000000;
- band = BANDWIDTH_8_MHZ;
} else if (c->bandwidth_hz <= 6000000) {
if_freq = 4000000;
- band = BANDWIDTH_6_MHZ;
} else if (c->bandwidth_hz <= 7000000) {
if_freq = 4500000;
- band = BANDWIDTH_7_MHZ;
} else { /* 8 MHz */
if_freq = 5000000;
- band = BANDWIDTH_8_MHZ;
}
tuner_freq = c->frequency;
@@ -652,7 +642,7 @@ static int tda827xa_set_params(struct dvb_frontend *fe)
goto err;
priv->frequency = c->frequency;
- priv->bandwidth = band;
+ priv->bandwidth = c->bandwidth_hz;
return 0;