staging: omap-thermal: bandgap: fix setting of alert thresholds
authorRadhesh Fadnis <radhesh.fadnis@ti.com>
Wed, 19 Sep 2012 17:07:49 +0000 (20:07 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 21 Sep 2012 15:56:40 +0000 (08:56 -0700)
commit463bf503bdab90bf269ad2a70656fe8536ff4933
tree41a44b2b23e5d3575dc9b788f496d5daf49f8050
parentcbf7d122cc50bd88cb9fd745c8341a009de0796d
staging: omap-thermal: bandgap: fix setting of alert thresholds

There was an error in check for the valid temperature in
function temp_to_adc_conversion. The temperature value was
compared with higher limit for less than condition as well,
resulting in returning -EINVAL. Corrected the check condition
to properly check for lower and higher temperature limits.

Signed-off-by: Radhesh Fadnis <radhesh.fadnis@ti.com>
Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/omap-thermal/omap-bandgap.c