aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hwmon/asb100.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/hwmon/asb100.c')
-rw-r--r--drivers/hwmon/asb100.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/hwmon/asb100.c b/drivers/hwmon/asb100.c
index 57b1c7b7ac3f..55d92e1e27d1 100644
--- a/drivers/hwmon/asb100.c
+++ b/drivers/hwmon/asb100.c
@@ -143,7 +143,7 @@ static int FAN_FROM_REG(u8 val, int div)
143 143
144/* TEMP: 0.001C/bit (-128C to +127C) 144/* TEMP: 0.001C/bit (-128C to +127C)
145 REG: 1C/bit, two's complement */ 145 REG: 1C/bit, two's complement */
146static u8 TEMP_TO_REG(int temp) 146static u8 TEMP_TO_REG(long temp)
147{ 147{
148 int ntemp = SENSORS_LIMIT(temp, ASB100_TEMP_MIN, ASB100_TEMP_MAX); 148 int ntemp = SENSORS_LIMIT(temp, ASB100_TEMP_MIN, ASB100_TEMP_MAX);
149 ntemp += (ntemp<0 ? -500 : 500); 149 ntemp += (ntemp<0 ? -500 : 500);
@@ -448,7 +448,7 @@ static ssize_t set_##reg(struct device *dev, const char *buf, \
448{ \ 448{ \
449 struct i2c_client *client = to_i2c_client(dev); \ 449 struct i2c_client *client = to_i2c_client(dev); \
450 struct asb100_data *data = i2c_get_clientdata(client); \ 450 struct asb100_data *data = i2c_get_clientdata(client); \
451 unsigned long val = simple_strtoul(buf, NULL, 10); \ 451 long val = simple_strtol(buf, NULL, 10); \
452 \ 452 \
453 mutex_lock(&data->update_lock); \ 453 mutex_lock(&data->update_lock); \
454 switch (nr) { \ 454 switch (nr) { \