summaryrefslogtreecommitdiff
path: root/linux/drivers
diff options
context:
space:
mode:
authorAndrew de Quincy <devnull@localhost>2005-07-20 01:23:16 +0000
committerAndrew de Quincy <devnull@localhost>2005-07-20 01:23:16 +0000
commitb10b7aec1b2bbb93720b0dce9c018ced37066848 (patch)
treeb9e6577c4ce300ef5c5e73d5de1e332a84f76be1 /linux/drivers
parentad6a8233b626fb8d79568aab0e19f09bbaec699c (diff)
downloadmediapointer-dvb-s2-b10b7aec1b2bbb93720b0dce9c018ced37066848.tar.gz
mediapointer-dvb-s2-b10b7aec1b2bbb93720b0dce9c018ced37066848.tar.bz2
Fix status calls.
Signed-off-by: Andrew de Quincey <adq_dvb@lidskialf.net>
Diffstat (limited to 'linux/drivers')
-rw-r--r--linux/drivers/media/dvb/frontends/s5h1420.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/linux/drivers/media/dvb/frontends/s5h1420.c b/linux/drivers/media/dvb/frontends/s5h1420.c
index f572d4dbf..d93998e24 100644
--- a/linux/drivers/media/dvb/frontends/s5h1420.c
+++ b/linux/drivers/media/dvb/frontends/s5h1420.c
@@ -368,16 +368,21 @@ static int s5h1420_read_ber(struct dvb_frontend* fe, u32* ber)
s5h1420_writereg(state, 0x46, 0x1d);
mdelay(25);
- return (s5h1420_readreg(state, 0x48) << 8) | s5h1420_readreg(state, 0x47);
+
+ *ber = (s5h1420_readreg(state, 0x48) << 8) | s5h1420_readreg(state, 0x47);
+
+ return 0;
}
static int s5h1420_read_signal_strength(struct dvb_frontend* fe, u16* strength)
{
struct s5h1420_state* state = fe->demodulator_priv;
- u8 val = 0xff - s5h1420_readreg(state, 0x15);
+ u8 val = s5h1420_readreg(state, 0x15);
+
+ *strength = (u16) ((val << 8) | val);
- return (int) ((val << 8) | val);
+ return 0;
}
static int s5h1420_read_ucblocks(struct dvb_frontend* fe, u32* ucblocks)
@@ -386,7 +391,10 @@ static int s5h1420_read_ucblocks(struct dvb_frontend* fe, u32* ucblocks)
s5h1420_writereg(state, 0x46, 0x1f);
mdelay(25);
- return (s5h1420_readreg(state, 0x48) << 8) | s5h1420_readreg(state, 0x47);
+
+ *ucblocks = (s5h1420_readreg(state, 0x48) << 8) | s5h1420_readreg(state, 0x47);
+
+ return 0;
}
static void s5h1420_reset(struct s5h1420_state* state)