diff options
Diffstat (limited to 'linux')
-rw-r--r-- | linux/drivers/media/dvb/frontends/alps_tdmb7.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/linux/drivers/media/dvb/frontends/alps_tdmb7.c b/linux/drivers/media/dvb/frontends/alps_tdmb7.c index 6303b8a29..6ba1f7045 100644 --- a/linux/drivers/media/dvb/frontends/alps_tdmb7.c +++ b/linux/drivers/media/dvb/frontends/alps_tdmb7.c @@ -359,15 +359,15 @@ int tdmb7_ioctl (struct dvb_frontend *fe, unsigned int cmd, void *arg) case FE_READ_SIGNAL_STRENGTH: { - u8 ber = cx22700_readreg (i2c, 0x0c) & 0x7f; - ber *= 2; - *((uint16_t*) arg) = ~((ber << 8) | ber); + u16 rs_ber = (cx22700_readreg (i2c, 0x0d) << 9) + | (cx22700_readreg (i2c, 0x0e) << 1); + *((uint16_t*) arg) = ~rs_ber; break; } case FE_READ_SNR: { - u16 rs_ber = (cx22700_readreg (i2c, 0x0d) & 0x7f) - | cx22700_readreg (i2c, 0x0e); + u16 rs_ber = (cx22700_readreg (i2c, 0x0d) << 9) + | (cx22700_readreg (i2c, 0x0e) << 1); *((uint16_t*) arg) = ~rs_ber; break; } |