hwmon: Allow writing of negative trigger temperatures
- replace differing temperature variable types by long - use strtol() instead of strtoul() for conversion Signed-off-by: Christian Hohnstaedt <chohnstaedt@innominate.com> Acked-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
This commit is contained in:

committed by
Mark M. Hoffman

parent
dcf3b5fb7f
commit
5bfedac045
@@ -33,7 +33,7 @@
|
||||
|
||||
/* TEMP: 0.001C/bit (-55C to +125C)
|
||||
REG: (0.5C/bit, two's complement) << 7 */
|
||||
static inline u16 LM75_TEMP_TO_REG(int temp)
|
||||
static inline u16 LM75_TEMP_TO_REG(long temp)
|
||||
{
|
||||
int ntemp = SENSORS_LIMIT(temp, LM75_TEMP_MIN, LM75_TEMP_MAX);
|
||||
ntemp += (ntemp<0 ? -250 : 250);
|
||||
|
Reference in New Issue
Block a user