]> 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)
commit8f11bf39de514a4d19bbc0b1afcc49deee418101
tree2b32c3f45833f16af8742f6bff00b4dccc856b4a
parentd9ccd00ad2c83147965d9e040c157b2efec695e6
[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