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/lm75.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/hwmon/lm75.c') diff --git a/drivers/hwmon/lm75.c b/drivers/hwmon/lm75.c index a40166ffad1..4fa32205e44 100644 --- a/drivers/hwmon/lm75.c +++ b/drivers/hwmon/lm75.c @@ -95,7 +95,7 @@ static ssize_t set_temp(struct device *dev, struct device_attribute *da, struct i2c_client *client = to_i2c_client(dev); struct lm75_data *data = i2c_get_clientdata(client); int nr = attr->index; - unsigned long temp = simple_strtoul(buf, NULL, 10); + long temp = simple_strtol(buf, NULL, 10); mutex_lock(&data->update_lock); data->temp[nr] = LM75_TEMP_TO_REG(temp); -- cgit v1.2.3