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>
This commit is contained in:
committed by
Mark M. Hoffman
parent
dcf3b5fb7f
commit
5bfedac045
@ -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);
|
||||
|
Reference in New Issue
Block a user