diff options
author | Christian Hohnstaedt <chohnstaedt@innominate.com> | 2007-08-16 11:40:10 +0200 |
---|---|---|
committer | Mark M. Hoffman <mhoffman@lightlink.com> | 2007-10-09 22:56:29 -0400 |
commit | 5bfedac045082a97e20d47d876071279ef984d28 (patch) | |
tree | c6432db00589d4858ca1b4a04624dc74be5ba181 /drivers/hwmon/asb100.c | |
parent | dcf3b5fb7fb6e1b56bfaf705e665b04870213768 (diff) | |
download | linux-3.10-5bfedac045082a97e20d47d876071279ef984d28.tar.gz linux-3.10-5bfedac045082a97e20d47d876071279ef984d28.tar.bz2 linux-3.10-5bfedac045082a97e20d47d876071279ef984d28.zip |
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/asb100.c')
-rw-r--r-- | drivers/hwmon/asb100.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/hwmon/asb100.c b/drivers/hwmon/asb100.c index 57b1c7b7ac3..55d92e1e27d 100644 --- a/drivers/hwmon/asb100.c +++ b/drivers/hwmon/asb100.c @@ -143,7 +143,7 @@ static int FAN_FROM_REG(u8 val, 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, ASB100_TEMP_MIN, ASB100_TEMP_MAX); ntemp += (ntemp<0 ? -500 : 500); @@ -448,7 +448,7 @@ static ssize_t set_##reg(struct device *dev, const char *buf, \ { \ struct i2c_client *client = to_i2c_client(dev); \ struct asb100_data *data = i2c_get_clientdata(client); \ - unsigned long val = simple_strtoul(buf, NULL, 10); \ + long val = simple_strtol(buf, NULL, 10); \ \ mutex_lock(&data->update_lock); \ switch (nr) { \ |