aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hwmon/w83627hf.c
diff options
context:
space:
mode:
authorChristian Hohnstaedt <chohnstaedt@innominate.com>2007-08-16 05:40:10 -0400
committerMark M. Hoffman <mhoffman@lightlink.com>2007-10-09 22:56:29 -0400
commit5bfedac045082a97e20d47d876071279ef984d28 (patch)
treec6432db00589d4858ca1b4a04624dc74be5ba181 /drivers/hwmon/w83627hf.c
parentdcf3b5fb7fb6e1b56bfaf705e665b04870213768 (diff)
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>
Diffstat (limited to 'drivers/hwmon/w83627hf.c')
-rw-r--r--drivers/hwmon/w83627hf.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/hwmon/w83627hf.c b/drivers/hwmon/w83627hf.c
index 7a4a15f4bf8..0866739a227 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)
263 263
264/* TEMP: 0.001C/bit (-128C to +127C) 264/* TEMP: 0.001C/bit (-128C to +127C)
265 REG: 1C/bit, two's complement */ 265 REG: 1C/bit, two's complement */
266static u8 TEMP_TO_REG(int temp) 266static u8 TEMP_TO_REG(long temp)
267{ 267{
268 int ntemp = SENSORS_LIMIT(temp, TEMP_MIN, TEMP_MAX); 268 int ntemp = SENSORS_LIMIT(temp, TEMP_MIN, TEMP_MAX);
269 ntemp += (ntemp<0 ? -500 : 500); 269 ntemp += (ntemp<0 ? -500 : 500);
@@ -642,9 +642,9 @@ static ssize_t \
642store_temp_##reg (struct device *dev, const char *buf, size_t count, int nr) \ 642store_temp_##reg (struct device *dev, const char *buf, size_t count, int nr) \
643{ \ 643{ \
644 struct w83627hf_data *data = dev_get_drvdata(dev); \ 644 struct w83627hf_data *data = dev_get_drvdata(dev); \
645 u32 val; \ 645 long val; \
646 \ 646 \
647 val = simple_strtoul(buf, NULL, 10); \ 647 val = simple_strtol(buf, NULL, 10); \
648 \ 648 \
649 mutex_lock(&data->update_lock); \ 649 mutex_lock(&data->update_lock); \
650 \ 650 \