diff options
author | Antti Palosaari <crope@iki.fi> | 2012-05-18 11:23:42 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2012-05-20 09:24:01 -0400 |
commit | 525ffc19b992f5d6a25413c36ba543a82585ed89 (patch) | |
tree | b0415c5ac2af5f4256a5db93c3b17ffbecbc9e51 | |
parent | eba672a045d8fbf62b229eac74ef444b6000c4c2 (diff) |
[media] rtl2830: implement .read_ber()
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r-- | drivers/media/dvb/frontends/rtl2830.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/drivers/media/dvb/frontends/rtl2830.c b/drivers/media/dvb/frontends/rtl2830.c index e6d7c501717a..266098656c48 100644 --- a/drivers/media/dvb/frontends/rtl2830.c +++ b/drivers/media/dvb/frontends/rtl2830.c | |||
@@ -450,8 +450,20 @@ err: | |||
450 | 450 | ||
451 | static int rtl2830_read_ber(struct dvb_frontend *fe, u32 *ber) | 451 | static int rtl2830_read_ber(struct dvb_frontend *fe, u32 *ber) |
452 | { | 452 | { |
453 | *ber = 0; | 453 | struct rtl2830_priv *priv = fe->demodulator_priv; |
454 | int ret; | ||
455 | u8 buf[2]; | ||
456 | |||
457 | ret = rtl2830_rd_regs(priv, 0x34e, buf, 2); | ||
458 | if (ret) | ||
459 | goto err; | ||
460 | |||
461 | *ber = buf[0] << 8 | buf[1]; | ||
462 | |||
454 | return 0; | 463 | return 0; |
464 | err: | ||
465 | dbg("%s: failed=%d", __func__, ret); | ||
466 | return ret; | ||
455 | } | 467 | } |
456 | 468 | ||
457 | static int rtl2830_read_ucblocks(struct dvb_frontend *fe, u32 *ucblocks) | 469 | static int rtl2830_read_ucblocks(struct dvb_frontend *fe, u32 *ucblocks) |