summaryrefslogtreecommitdiff
path: root/drivers/media
diff options
context:
space:
mode:
authorAbylay Ospan <aospan@netup.ru>2016-07-15 14:59:37 -0300
committerMauro Carvalho Chehab <mchehab@s-opensource.com>2016-07-16 06:58:59 -0300
commit997bdc0c8edf9fce33324993ce94965cd5a5d39a (patch)
tree5cf9877557d7abfa935d12f84504c7678ba3e368 /drivers/media
parent313a7dfb239f9433e5892d5a640f97b165b3e452 (diff)
[media] cxd2841er: fix switch-case for DVB-C
DVB-C should use cxd2841er_read_agc_gain_c() to get the gain. The same function is used for all DVB-C annex delivery systems. Signed-off-by: Abylay Ospan <aospan@netup.ru> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/dvb-frontends/cxd2841er.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/drivers/media/dvb-frontends/cxd2841er.c b/drivers/media/dvb-frontends/cxd2841er.c
index 2476d356069c..b2bfbaab28cd 100644
--- a/drivers/media/dvb-frontends/cxd2841er.c
+++ b/drivers/media/dvb-frontends/cxd2841er.c
@@ -1750,13 +1750,6 @@ static void cxd2841er_read_signal_strength(struct dvb_frontend *fe)
dev_dbg(&priv->i2c->dev, "%s()\n", __func__);
switch (p->delivery_system) {
- case SYS_DVBC_ANNEX_B:
- case SYS_DVBC_ANNEX_C:
- strength = 65535 - cxd2841er_read_agc_gain_c(
- priv, p->delivery_system);
- p->strength.stat[0].scale = FE_SCALE_RELATIVE;
- p->strength.stat[0].uvalue = strength;
- break;
case SYS_DVBT:
case SYS_DVBT2:
strength = cxd2841er_read_agc_gain_t_t2(priv,
@@ -1766,7 +1759,9 @@ static void cxd2841er_read_signal_strength(struct dvb_frontend *fe)
p->strength.stat[0].uvalue = strength * 366 / 100 - 89520;
break; /* Code moved out of the function */
case SYS_DVBC_ANNEX_A:
- strength = cxd2841er_read_agc_gain_t_t2(priv,
+ case SYS_DVBC_ANNEX_B:
+ case SYS_DVBC_ANNEX_C:
+ strength = cxd2841er_read_agc_gain_c(priv,
p->delivery_system);
p->strength.stat[0].scale = FE_SCALE_DECIBEL;
/*