]> git.baikalelectronics.ru Git - kernel.git/commit
[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)
commit29ccc6df1d79ac77913b26058ae3a83c2e0b1c56
tree2b32c3f45833f16af8742f6bff00b4dccc856b4a
parent0dfc290ded0edcec49723f7226b5efdf70c89be4
[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