Skip to content

Commit

Permalink
[media] rtl2830: implement .read_ber()
Browse files Browse the repository at this point in the history
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
  • Loading branch information
Antti Palosaari authored and Mauro Carvalho Chehab committed May 20, 2012
1 parent eba672a commit 525ffc1
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion drivers/media/dvb/frontends/rtl2830.c
Original file line number Diff line number Diff line change
Expand Up @@ -450,8 +450,20 @@ static int rtl2830_read_snr(struct dvb_frontend *fe, u16 *snr)

static int rtl2830_read_ber(struct dvb_frontend *fe, u32 *ber)
{
*ber = 0;
struct rtl2830_priv *priv = fe->demodulator_priv;
int ret;
u8 buf[2];

ret = rtl2830_rd_regs(priv, 0x34e, buf, 2);
if (ret)
goto err;

*ber = buf[0] << 8 | buf[1];

return 0;
err:
dbg("%s: failed=%d", __func__, ret);
return ret;
}

static int rtl2830_read_ucblocks(struct dvb_frontend *fe, u32 *ucblocks)
Expand Down

0 comments on commit 525ffc1

Please sign in to comment.