aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hwmon/ds1621.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/ds1621.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/ds1621.c')
-rw-r--r--drivers/hwmon/ds1621.c2
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,
151 struct sensor_device_attribute *attr = to_sensor_dev_attr(da); 151 struct sensor_device_attribute *attr = to_sensor_dev_attr(da);
152 struct i2c_client *client = to_i2c_client(dev); 152 struct i2c_client *client = to_i2c_client(dev);
153 struct ds1621_data *data = ds1621_update_client(dev); 153 struct ds1621_data *data = ds1621_update_client(dev);
154 u16 val = LM75_TEMP_TO_REG(simple_strtoul(buf, NULL, 10)); 154 u16 val = LM75_TEMP_TO_REG(simple_strtol(buf, NULL, 10));
155 155
156 mutex_lock(&data->update_lock); 156 mutex_lock(&data->update_lock);
157 data->temp[attr->index] = val; 157 data->temp[attr->index] = val;