aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hwmon/w83627ehf.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/hwmon/w83627ehf.c')
-rw-r--r--drivers/hwmon/w83627ehf.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/hwmon/w83627ehf.c b/drivers/hwmon/w83627ehf.c
index d9a9ec7dd84a..e3dfc52b5995 100644
--- a/drivers/hwmon/w83627ehf.c
+++ b/drivers/hwmon/w83627ehf.c
@@ -223,7 +223,7 @@ temp1_from_reg(s8 reg)
223} 223}
224 224
225static inline s8 225static inline s8
226temp1_to_reg(int temp, int min, int max) 226temp1_to_reg(long temp, int min, int max)
227{ 227{
228 if (temp <= min) 228 if (temp <= min)
229 return min / 1000; 229 return min / 1000;
@@ -805,7 +805,7 @@ store_temp1_##reg(struct device *dev, struct device_attribute *attr, \
805 const char *buf, size_t count) \ 805 const char *buf, size_t count) \
806{ \ 806{ \
807 struct w83627ehf_data *data = dev_get_drvdata(dev); \ 807 struct w83627ehf_data *data = dev_get_drvdata(dev); \
808 u32 val = simple_strtoul(buf, NULL, 10); \ 808 long val = simple_strtol(buf, NULL, 10); \
809 \ 809 \
810 mutex_lock(&data->update_lock); \ 810 mutex_lock(&data->update_lock); \
811 data->temp1_##reg = temp1_to_reg(val, -128000, 127000); \ 811 data->temp1_##reg = temp1_to_reg(val, -128000, 127000); \
@@ -840,7 +840,7 @@ store_##reg(struct device *dev, struct device_attribute *attr, \
840 struct w83627ehf_data *data = dev_get_drvdata(dev); \ 840 struct w83627ehf_data *data = dev_get_drvdata(dev); \
841 struct sensor_device_attribute *sensor_attr = to_sensor_dev_attr(attr); \ 841 struct sensor_device_attribute *sensor_attr = to_sensor_dev_attr(attr); \
842 int nr = sensor_attr->index; \ 842 int nr = sensor_attr->index; \
843 u32 val = simple_strtoul(buf, NULL, 10); \ 843 long val = simple_strtol(buf, NULL, 10); \
844 \ 844 \
845 mutex_lock(&data->update_lock); \ 845 mutex_lock(&data->update_lock); \
846 data->reg[nr] = LM75_TEMP_TO_REG(val); \ 846 data->reg[nr] = LM75_TEMP_TO_REG(val); \