From 5bfedac045082a97e20d47d876071279ef984d28 Mon Sep 17 00:00:00 2001 From: Christian Hohnstaedt Date: Thu, 16 Aug 2007 11:40:10 +0200 Subject: 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 Acked-by: Jean Delvare Signed-off-by: Mark M. Hoffman --- drivers/hwmon/w83627hf.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'drivers/hwmon/w83627hf.c') diff --git a/drivers/hwmon/w83627hf.c b/drivers/hwmon/w83627hf.c index 7a4a15f4bf8b..0866739a227c 100644 --- a/drivers/hwmon/w83627hf.c +++ b/drivers/hwmon/w83627hf.c @@ -263,7 +263,7 @@ static inline u8 FAN_TO_REG(long rpm, int div) /* TEMP: 0.001C/bit (-128C to +127C) REG: 1C/bit, two's complement */ -static u8 TEMP_TO_REG(int temp) +static u8 TEMP_TO_REG(long temp) { int ntemp = SENSORS_LIMIT(temp, TEMP_MIN, TEMP_MAX); ntemp += (ntemp<0 ? -500 : 500); @@ -642,9 +642,9 @@ static ssize_t \ store_temp_##reg (struct device *dev, const char *buf, size_t count, int nr) \ { \ struct w83627hf_data *data = dev_get_drvdata(dev); \ - u32 val; \ + long val; \ \ - val = simple_strtoul(buf, NULL, 10); \ + val = simple_strtol(buf, NULL, 10); \ \ mutex_lock(&data->update_lock); \ \ -- cgit v1.2.3