[media] stb0899: fix the limits for signal strength values
authorKlaus Schmidinger <Klaus.Schmidinger@tvdr.de>
Tue, 24 Jan 2012 08:33:53 +0000 (05:33 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Tue, 20 Mar 2012 02:06:40 +0000 (23:06 -0300)
commit0e377819b99bf2290c94a0eec2be4443b4630ccd
tree2b32c3f45833f16af8742f6bff00b4dccc856b4a
parentfa5527cd3f428845d7950e6b2bab6babcbcd907b
[media] stb0899: fix the limits for signal strength values

stb0899: fix the limits for signal strength values

stb0899_read_signal_strength() adds an offset to the result of the table lookup.
That offset must correspond to the lowest value in the lookup table, to make sure
the result doesn't get below 0, which would mean a "very high" value since the
parameter is unsigned.
'strength' and 'snr' need to be initialized to 0 to make sure they have a
defined result in case there is no "internal->lock".

Signed-off-by: Klaus Schmidinger <Klaus.Schmidinger@tvdr.de>
Cc: Manu Abraham <abraham.manu@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/dvb/frontends/stb0899_drv.c