mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-18 09:44:18 +08:00
[media] rtl2830: implement .read_ber()
Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
This commit is contained in:
parent
eba672a045
commit
525ffc19b9
@ -450,8 +450,20 @@ err:
|
||||
|
||||
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)
|
||||
|
Loading…
Reference in New Issue
Block a user