diff options
author | Mauro Carvalho Chehab <mchehab@redhat.com> | 2013-04-10 08:04:03 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2013-04-16 20:29:31 -0400 |
commit | 75c1819e5e42064e66d4f88a5af628a1604ad52d (patch) | |
tree | 121dcd86b25b40753361bdc8dcd0cc94ac0ef070 /drivers/media | |
parent | 84ddc33c20cd026871eb3585ed77badacb0fc113 (diff) |
[media] r820t: better report signal strength
If signal is zero, shows it as a zero, not as 0xff.
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Tested-by: Antti Palosaari <crope@iki.fi>
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/tuners/r820t.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/media/tuners/r820t.c b/drivers/media/tuners/r820t.c index 5be4635c521d..d5686e8a8bc6 100644 --- a/drivers/media/tuners/r820t.c +++ b/drivers/media/tuners/r820t.c | |||
@@ -1506,6 +1506,8 @@ static int r820t_signal(struct dvb_frontend *fe, u16 *strength) | |||
1506 | 1506 | ||
1507 | /* A higher gain at LNA means a lower signal strength */ | 1507 | /* A higher gain at LNA means a lower signal strength */ |
1508 | *strength = (45 - rc) << 4 | 0xff; | 1508 | *strength = (45 - rc) << 4 | 0xff; |
1509 | if (*strength == 0xff) | ||
1510 | *strength = 0; | ||
1509 | } else { | 1511 | } else { |
1510 | *strength = 0; | 1512 | *strength = 0; |
1511 | } | 1513 | } |