summaryrefslogtreecommitdiff
path: root/drivers/media/dvb-frontends/rtl2832.c
diff options
context:
space:
mode:
authorAntti Palosaari <crope@iki.fi>2014-12-14 16:10:22 +0300
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>2015-02-03 21:07:22 +0300
commit084330b746d9fb369cc6df17fdbc9dc8952249bf (patch)
tree886f68b169eb1d34a363f42079c2bf66f8afdf11 /drivers/media/dvb-frontends/rtl2832.c
parentf7caf93fb8ed299c1f9a3d2713c8d588c938316e (diff)
downloadlinux-084330b746d9fb369cc6df17fdbc9dc8952249bf.tar.xz
[media] rtl2832: wrap DVBv5 BER to DVBv3
Change legacy DVBv3 read BER to return values calculated by DVBv5 statistics. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/media/dvb-frontends/rtl2832.c')
-rw-r--r--drivers/media/dvb-frontends/rtl2832.c13
1 files changed, 2 insertions, 11 deletions
diff --git a/drivers/media/dvb-frontends/rtl2832.c b/drivers/media/dvb-frontends/rtl2832.c
index 18f150105438..90d4f45d9958 100644
--- a/drivers/media/dvb-frontends/rtl2832.c
+++ b/drivers/media/dvb-frontends/rtl2832.c
@@ -805,20 +805,11 @@ static int rtl2832_read_snr(struct dvb_frontend *fe, u16 *snr)
static int rtl2832_read_ber(struct dvb_frontend *fe, u32 *ber)
{
struct rtl2832_dev *dev = fe->demodulator_priv;
- struct i2c_client *client = dev->client;
- int ret;
- u8 buf[2];
-
- ret = rtl2832_rd_regs(dev, 0x4e, 3, buf, 2);
- if (ret)
- goto err;
- *ber = buf[0] << 8 | buf[1];
+ *ber = (dev->post_bit_error - dev->post_bit_error_prev);
+ dev->post_bit_error_prev = dev->post_bit_error;
return 0;
-err:
- dev_dbg(&client->dev, "failed=%d\n", ret);
- return ret;
}
static void rtl2832_stat_work(struct work_struct *work)