diff options
author | Christian Hohnstaedt <chohnstaedt@innominate.com> | 2007-08-16 11:40:10 +0200 |
---|---|---|
committer | Mark M. Hoffman <mhoffman@lightlink.com> | 2007-10-10 04:56:29 +0200 |
commit | 5bfedac045082a97e20d47d876071279ef984d28 (patch) | |
tree | c6432db00589d4858ca1b4a04624dc74be5ba181 /drivers/hwmon/ds1621.c | |
parent | hwmon: (thmc50) add individual alarm & fault files (diff) | |
download | linux-5bfedac045082a97e20d47d876071279ef984d28.tar.xz linux-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/ds1621.c')
-rw-r--r-- | drivers/hwmon/ds1621.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/hwmon/ds1621.c b/drivers/hwmon/ds1621.c index 1212d6b7f316..5a861f936120 100644 --- a/drivers/hwmon/ds1621.c +++ b/drivers/hwmon/ds1621.c @@ -151,7 +151,7 @@ static ssize_t set_temp(struct device *dev, struct device_attribute *da, struct sensor_device_attribute *attr = to_sensor_dev_attr(da); struct i2c_client *client = to_i2c_client(dev); struct ds1621_data *data = ds1621_update_client(dev); - u16 val = LM75_TEMP_TO_REG(simple_strtoul(buf, NULL, 10)); + u16 val = LM75_TEMP_TO_REG(simple_strtol(buf, NULL, 10)); mutex_lock(&data->update_lock); data->temp[attr->index] = val; |