summaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb-frontends/si2165.c
diff options
context:
space:
mode:
authorMatthias Schwarzott <zzam@gentoo.org>2015-12-03 18:12:50 -0200
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>2016-01-25 12:51:32 -0200
commit7655a3aea2ca14b9d34af929304f3c08140cc91c (patch)
treeb4e9d17b2ad028058bedb9efa1e48e727f7bc6b8 /drivers/media/dvb-frontends/si2165.c
parenta561d768c13287ef156863c4ff149306844101fa (diff)
downloadop-kernel-dev-7655a3aea2ca14b9d34af929304f3c08140cc91c.zip
op-kernel-dev-7655a3aea2ca14b9d34af929304f3c08140cc91c.tar.gz
[media] si2165: Reject DVB-T bandwidth auto mode
The si2165 does not support bandwidth auto-detection. Reject the request. Signed-off-by: Matthias Schwarzott <zzam@gentoo.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/media/dvb-frontends/si2165.c')
-rw-r--r--drivers/media/dvb-frontends/si2165.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/media/dvb-frontends/si2165.c b/drivers/media/dvb-frontends/si2165.c
index 2b93241..6599766 100644
--- a/drivers/media/dvb-frontends/si2165.c
+++ b/drivers/media/dvb-frontends/si2165.c
@@ -825,19 +825,19 @@ static int si2165_set_frontend_dvbt(struct dvb_frontend *fe)
struct si2165_state *state = fe->demodulator_priv;
u32 dvb_rate = 0;
u16 bw10k;
+ u32 bw_hz = p->bandwidth_hz;
dprintk("%s: called\n", __func__);
if (!state->has_dvbt)
return -EINVAL;
- if (p->bandwidth_hz > 0) {
- dvb_rate = p->bandwidth_hz * 8 / 7;
- bw10k = p->bandwidth_hz / 10000;
- } else {
- dvb_rate = 8 * 8 / 7;
- bw10k = 800;
- }
+ /* no bandwidth auto-detection */
+ if (bw_hz == 0)
+ return -EINVAL;
+
+ dvb_rate = bw_hz * 8 / 7;
+ bw10k = bw_hz / 10000;
ret = si2165_adjust_pll_divl(state, 12);
if (ret < 0)
OpenPOWER on IntegriCloud