aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hwmon
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2014-07-16 09:10:07 -0400
committerIngo Molnar <mingo@kernel.org>2014-07-16 09:10:07 -0400
commitd26fad5b38e1c4667d4f2604936e59c837caa54d (patch)
tree04b524a69a0129c181567445bff18847a1b44721 /drivers/hwmon
parente720fff6341fe4b95e5a93c939bd3c77fa55ced4 (diff)
parent1795cd9b3a91d4b5473c97f491d63892442212ab (diff)
Merge tag 'v3.16-rc5' into sched/core, to refresh the branch before applying bigger tree-wide changes
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'drivers/hwmon')
-rw-r--r--drivers/hwmon/Kconfig6
-rw-r--r--drivers/hwmon/adc128d818.c28
-rw-r--r--drivers/hwmon/adm1021.c14
-rw-r--r--drivers/hwmon/adm1029.c3
-rw-r--r--drivers/hwmon/adm1031.c8
-rw-r--r--drivers/hwmon/amc6821.c2
-rw-r--r--drivers/hwmon/emc2103.c15
-rw-r--r--drivers/hwmon/gpio-fan.c2
-rw-r--r--drivers/hwmon/ntc_thermistor.c16
-rw-r--r--drivers/hwmon/w83l786ng.c2
10 files changed, 56 insertions, 40 deletions
diff --git a/drivers/hwmon/Kconfig b/drivers/hwmon/Kconfig
index 08531a128f53..02d3d85829f3 100644
--- a/drivers/hwmon/Kconfig
+++ b/drivers/hwmon/Kconfig
@@ -1052,7 +1052,7 @@ config SENSORS_PC87427
1052 will be called pc87427. 1052 will be called pc87427.
1053 1053
1054config SENSORS_NTC_THERMISTOR 1054config SENSORS_NTC_THERMISTOR
1055 tristate "NTC thermistor support" 1055 tristate "NTC thermistor support from Murata"
1056 depends on !OF || IIO=n || IIO 1056 depends on !OF || IIO=n || IIO
1057 help 1057 help
1058 This driver supports NTC thermistors sensor reading and its 1058 This driver supports NTC thermistors sensor reading and its
@@ -1060,7 +1060,8 @@ config SENSORS_NTC_THERMISTOR
1060 send notifications about the temperature. 1060 send notifications about the temperature.
1061 1061
1062 Currently, this driver supports 1062 Currently, this driver supports
1063 NCP15WB473, NCP18WB473, NCP21WB473, NCP03WB473, and NCP15WL333. 1063 NCP15WB473, NCP18WB473, NCP21WB473, NCP03WB473, and NCP15WL333
1064 from Murata.
1064 1065
1065 This driver can also be built as a module. If so, the module 1066 This driver can also be built as a module. If so, the module
1066 will be called ntc-thermistor. 1067 will be called ntc-thermistor.
@@ -1176,6 +1177,7 @@ config SENSORS_DME1737
1176config SENSORS_EMC1403 1177config SENSORS_EMC1403
1177 tristate "SMSC EMC1403/23 thermal sensor" 1178 tristate "SMSC EMC1403/23 thermal sensor"
1178 depends on I2C 1179 depends on I2C
1180 select REGMAP_I2C
1179 help 1181 help
1180 If you say yes here you get support for the SMSC EMC1403/23 1182 If you say yes here you get support for the SMSC EMC1403/23
1181 temperature monitoring chip. 1183 temperature monitoring chip.
diff --git a/drivers/hwmon/adc128d818.c b/drivers/hwmon/adc128d818.c
index 5ffd81f19d01..0625e50d7a6e 100644
--- a/drivers/hwmon/adc128d818.c
+++ b/drivers/hwmon/adc128d818.c
@@ -239,50 +239,50 @@ static ssize_t adc128_show_alarm(struct device *dev,
239 return sprintf(buf, "%u\n", !!(alarms & mask)); 239 return sprintf(buf, "%u\n", !!(alarms & mask));
240} 240}
241 241
242static SENSOR_DEVICE_ATTR_2(in0_input, S_IWUSR | S_IRUGO, 242static SENSOR_DEVICE_ATTR_2(in0_input, S_IRUGO,
243 adc128_show_in, adc128_set_in, 0, 0); 243 adc128_show_in, NULL, 0, 0);
244static SENSOR_DEVICE_ATTR_2(in0_min, S_IWUSR | S_IRUGO, 244static SENSOR_DEVICE_ATTR_2(in0_min, S_IWUSR | S_IRUGO,
245 adc128_show_in, adc128_set_in, 0, 1); 245 adc128_show_in, adc128_set_in, 0, 1);
246static SENSOR_DEVICE_ATTR_2(in0_max, S_IWUSR | S_IRUGO, 246static SENSOR_DEVICE_ATTR_2(in0_max, S_IWUSR | S_IRUGO,
247 adc128_show_in, adc128_set_in, 0, 2); 247 adc128_show_in, adc128_set_in, 0, 2);
248 248
249static SENSOR_DEVICE_ATTR_2(in1_input, S_IWUSR | S_IRUGO, 249static SENSOR_DEVICE_ATTR_2(in1_input, S_IRUGO,
250 adc128_show_in, adc128_set_in, 1, 0); 250 adc128_show_in, NULL, 1, 0);
251static SENSOR_DEVICE_ATTR_2(in1_min, S_IWUSR | S_IRUGO, 251static SENSOR_DEVICE_ATTR_2(in1_min, S_IWUSR | S_IRUGO,
252 adc128_show_in, adc128_set_in, 1, 1); 252 adc128_show_in, adc128_set_in, 1, 1);
253static SENSOR_DEVICE_ATTR_2(in1_max, S_IWUSR | S_IRUGO, 253static SENSOR_DEVICE_ATTR_2(in1_max, S_IWUSR | S_IRUGO,
254 adc128_show_in, adc128_set_in, 1, 2); 254 adc128_show_in, adc128_set_in, 1, 2);
255 255
256static SENSOR_DEVICE_ATTR_2(in2_input, S_IWUSR | S_IRUGO, 256static SENSOR_DEVICE_ATTR_2(in2_input, S_IRUGO,
257 adc128_show_in, adc128_set_in, 2, 0); 257 adc128_show_in, NULL, 2, 0);
258static SENSOR_DEVICE_ATTR_2(in2_min, S_IWUSR | S_IRUGO, 258static SENSOR_DEVICE_ATTR_2(in2_min, S_IWUSR | S_IRUGO,
259 adc128_show_in, adc128_set_in, 2, 1); 259 adc128_show_in, adc128_set_in, 2, 1);
260static SENSOR_DEVICE_ATTR_2(in2_max, S_IWUSR | S_IRUGO, 260static SENSOR_DEVICE_ATTR_2(in2_max, S_IWUSR | S_IRUGO,
261 adc128_show_in, adc128_set_in, 2, 2); 261 adc128_show_in, adc128_set_in, 2, 2);
262 262
263static SENSOR_DEVICE_ATTR_2(in3_input, S_IWUSR | S_IRUGO, 263static SENSOR_DEVICE_ATTR_2(in3_input, S_IRUGO,
264 adc128_show_in, adc128_set_in, 3, 0); 264 adc128_show_in, NULL, 3, 0);
265static SENSOR_DEVICE_ATTR_2(in3_min, S_IWUSR | S_IRUGO, 265static SENSOR_DEVICE_ATTR_2(in3_min, S_IWUSR | S_IRUGO,
266 adc128_show_in, adc128_set_in, 3, 1); 266 adc128_show_in, adc128_set_in, 3, 1);
267static SENSOR_DEVICE_ATTR_2(in3_max, S_IWUSR | S_IRUGO, 267static SENSOR_DEVICE_ATTR_2(in3_max, S_IWUSR | S_IRUGO,
268 adc128_show_in, adc128_set_in, 3, 2); 268 adc128_show_in, adc128_set_in, 3, 2);
269 269
270static SENSOR_DEVICE_ATTR_2(in4_input, S_IWUSR | S_IRUGO, 270static SENSOR_DEVICE_ATTR_2(in4_input, S_IRUGO,
271 adc128_show_in, adc128_set_in, 4, 0); 271 adc128_show_in, NULL, 4, 0);
272static SENSOR_DEVICE_ATTR_2(in4_min, S_IWUSR | S_IRUGO, 272static SENSOR_DEVICE_ATTR_2(in4_min, S_IWUSR | S_IRUGO,
273 adc128_show_in, adc128_set_in, 4, 1); 273 adc128_show_in, adc128_set_in, 4, 1);
274static SENSOR_DEVICE_ATTR_2(in4_max, S_IWUSR | S_IRUGO, 274static SENSOR_DEVICE_ATTR_2(in4_max, S_IWUSR | S_IRUGO,
275 adc128_show_in, adc128_set_in, 4, 2); 275 adc128_show_in, adc128_set_in, 4, 2);
276 276
277static SENSOR_DEVICE_ATTR_2(in5_input, S_IWUSR | S_IRUGO, 277static SENSOR_DEVICE_ATTR_2(in5_input, S_IRUGO,
278 adc128_show_in, adc128_set_in, 5, 0); 278 adc128_show_in, NULL, 5, 0);
279static SENSOR_DEVICE_ATTR_2(in5_min, S_IWUSR | S_IRUGO, 279static SENSOR_DEVICE_ATTR_2(in5_min, S_IWUSR | S_IRUGO,
280 adc128_show_in, adc128_set_in, 5, 1); 280 adc128_show_in, adc128_set_in, 5, 1);
281static SENSOR_DEVICE_ATTR_2(in5_max, S_IWUSR | S_IRUGO, 281static SENSOR_DEVICE_ATTR_2(in5_max, S_IWUSR | S_IRUGO,
282 adc128_show_in, adc128_set_in, 5, 2); 282 adc128_show_in, adc128_set_in, 5, 2);
283 283
284static SENSOR_DEVICE_ATTR_2(in6_input, S_IWUSR | S_IRUGO, 284static SENSOR_DEVICE_ATTR_2(in6_input, S_IRUGO,
285 adc128_show_in, adc128_set_in, 6, 0); 285 adc128_show_in, NULL, 6, 0);
286static SENSOR_DEVICE_ATTR_2(in6_min, S_IWUSR | S_IRUGO, 286static SENSOR_DEVICE_ATTR_2(in6_min, S_IWUSR | S_IRUGO,
287 adc128_show_in, adc128_set_in, 6, 1); 287 adc128_show_in, adc128_set_in, 6, 1);
288static SENSOR_DEVICE_ATTR_2(in6_max, S_IWUSR | S_IRUGO, 288static SENSOR_DEVICE_ATTR_2(in6_max, S_IWUSR | S_IRUGO,
diff --git a/drivers/hwmon/adm1021.c b/drivers/hwmon/adm1021.c
index 3eb4281689b5..d74241bb278c 100644
--- a/drivers/hwmon/adm1021.c
+++ b/drivers/hwmon/adm1021.c
@@ -185,7 +185,7 @@ static ssize_t set_temp_max(struct device *dev,
185 struct adm1021_data *data = dev_get_drvdata(dev); 185 struct adm1021_data *data = dev_get_drvdata(dev);
186 struct i2c_client *client = data->client; 186 struct i2c_client *client = data->client;
187 long temp; 187 long temp;
188 int err; 188 int reg_val, err;
189 189
190 err = kstrtol(buf, 10, &temp); 190 err = kstrtol(buf, 10, &temp);
191 if (err) 191 if (err)
@@ -193,10 +193,11 @@ static ssize_t set_temp_max(struct device *dev,
193 temp /= 1000; 193 temp /= 1000;
194 194
195 mutex_lock(&data->update_lock); 195 mutex_lock(&data->update_lock);
196 data->temp_max[index] = clamp_val(temp, -128, 127); 196 reg_val = clamp_val(temp, -128, 127);
197 data->temp_max[index] = reg_val * 1000;
197 if (!read_only) 198 if (!read_only)
198 i2c_smbus_write_byte_data(client, ADM1021_REG_TOS_W(index), 199 i2c_smbus_write_byte_data(client, ADM1021_REG_TOS_W(index),
199 data->temp_max[index]); 200 reg_val);
200 mutex_unlock(&data->update_lock); 201 mutex_unlock(&data->update_lock);
201 202
202 return count; 203 return count;
@@ -210,7 +211,7 @@ static ssize_t set_temp_min(struct device *dev,
210 struct adm1021_data *data = dev_get_drvdata(dev); 211 struct adm1021_data *data = dev_get_drvdata(dev);
211 struct i2c_client *client = data->client; 212 struct i2c_client *client = data->client;
212 long temp; 213 long temp;
213 int err; 214 int reg_val, err;
214 215
215 err = kstrtol(buf, 10, &temp); 216 err = kstrtol(buf, 10, &temp);
216 if (err) 217 if (err)
@@ -218,10 +219,11 @@ static ssize_t set_temp_min(struct device *dev,
218 temp /= 1000; 219 temp /= 1000;
219 220
220 mutex_lock(&data->update_lock); 221 mutex_lock(&data->update_lock);
221 data->temp_min[index] = clamp_val(temp, -128, 127); 222 reg_val = clamp_val(temp, -128, 127);
223 data->temp_min[index] = reg_val * 1000;
222 if (!read_only) 224 if (!read_only)
223 i2c_smbus_write_byte_data(client, ADM1021_REG_THYST_W(index), 225 i2c_smbus_write_byte_data(client, ADM1021_REG_THYST_W(index),
224 data->temp_min[index]); 226 reg_val);
225 mutex_unlock(&data->update_lock); 227 mutex_unlock(&data->update_lock);
226 228
227 return count; 229 return count;
diff --git a/drivers/hwmon/adm1029.c b/drivers/hwmon/adm1029.c
index 78339e880bd6..2804571b269e 100644
--- a/drivers/hwmon/adm1029.c
+++ b/drivers/hwmon/adm1029.c
@@ -232,6 +232,9 @@ static ssize_t set_fan_div(struct device *dev,
232 /* Update the value */ 232 /* Update the value */
233 reg = (reg & 0x3F) | (val << 6); 233 reg = (reg & 0x3F) | (val << 6);
234 234
235 /* Update the cache */
236 data->fan_div[attr->index] = reg;
237
235 /* Write value */ 238 /* Write value */
236 i2c_smbus_write_byte_data(client, 239 i2c_smbus_write_byte_data(client,
237 ADM1029_REG_FAN_DIV[attr->index], reg); 240 ADM1029_REG_FAN_DIV[attr->index], reg);
diff --git a/drivers/hwmon/adm1031.c b/drivers/hwmon/adm1031.c
index a8a540ca8c34..51c1a5a165ab 100644
--- a/drivers/hwmon/adm1031.c
+++ b/drivers/hwmon/adm1031.c
@@ -365,6 +365,7 @@ set_auto_temp_min(struct device *dev, struct device_attribute *attr,
365 if (ret) 365 if (ret)
366 return ret; 366 return ret;
367 367
368 val = clamp_val(val, 0, 127000);
368 mutex_lock(&data->update_lock); 369 mutex_lock(&data->update_lock);
369 data->auto_temp[nr] = AUTO_TEMP_MIN_TO_REG(val, data->auto_temp[nr]); 370 data->auto_temp[nr] = AUTO_TEMP_MIN_TO_REG(val, data->auto_temp[nr]);
370 adm1031_write_value(client, ADM1031_REG_AUTO_TEMP(nr), 371 adm1031_write_value(client, ADM1031_REG_AUTO_TEMP(nr),
@@ -394,6 +395,7 @@ set_auto_temp_max(struct device *dev, struct device_attribute *attr,
394 if (ret) 395 if (ret)
395 return ret; 396 return ret;
396 397
398 val = clamp_val(val, 0, 127000);
397 mutex_lock(&data->update_lock); 399 mutex_lock(&data->update_lock);
398 data->temp_max[nr] = AUTO_TEMP_MAX_TO_REG(val, data->auto_temp[nr], 400 data->temp_max[nr] = AUTO_TEMP_MAX_TO_REG(val, data->auto_temp[nr],
399 data->pwm[nr]); 401 data->pwm[nr]);
@@ -696,7 +698,7 @@ static ssize_t set_temp_min(struct device *dev, struct device_attribute *attr,
696 if (ret) 698 if (ret)
697 return ret; 699 return ret;
698 700
699 val = clamp_val(val, -55000, nr == 0 ? 127750 : 127875); 701 val = clamp_val(val, -55000, 127000);
700 mutex_lock(&data->update_lock); 702 mutex_lock(&data->update_lock);
701 data->temp_min[nr] = TEMP_TO_REG(val); 703 data->temp_min[nr] = TEMP_TO_REG(val);
702 adm1031_write_value(client, ADM1031_REG_TEMP_MIN(nr), 704 adm1031_write_value(client, ADM1031_REG_TEMP_MIN(nr),
@@ -717,7 +719,7 @@ static ssize_t set_temp_max(struct device *dev, struct device_attribute *attr,
717 if (ret) 719 if (ret)
718 return ret; 720 return ret;
719 721
720 val = clamp_val(val, -55000, nr == 0 ? 127750 : 127875); 722 val = clamp_val(val, -55000, 127000);
721 mutex_lock(&data->update_lock); 723 mutex_lock(&data->update_lock);
722 data->temp_max[nr] = TEMP_TO_REG(val); 724 data->temp_max[nr] = TEMP_TO_REG(val);
723 adm1031_write_value(client, ADM1031_REG_TEMP_MAX(nr), 725 adm1031_write_value(client, ADM1031_REG_TEMP_MAX(nr),
@@ -738,7 +740,7 @@ static ssize_t set_temp_crit(struct device *dev, struct device_attribute *attr,
738 if (ret) 740 if (ret)
739 return ret; 741 return ret;
740 742
741 val = clamp_val(val, -55000, nr == 0 ? 127750 : 127875); 743 val = clamp_val(val, -55000, 127000);
742 mutex_lock(&data->update_lock); 744 mutex_lock(&data->update_lock);
743 data->temp_crit[nr] = TEMP_TO_REG(val); 745 data->temp_crit[nr] = TEMP_TO_REG(val);
744 adm1031_write_value(client, ADM1031_REG_TEMP_CRIT(nr), 746 adm1031_write_value(client, ADM1031_REG_TEMP_CRIT(nr),
diff --git a/drivers/hwmon/amc6821.c b/drivers/hwmon/amc6821.c
index eea817296513..9f2be3dd28f3 100644
--- a/drivers/hwmon/amc6821.c
+++ b/drivers/hwmon/amc6821.c
@@ -704,7 +704,7 @@ static SENSOR_DEVICE_ATTR(temp1_max_alarm, S_IRUGO,
704 get_temp_alarm, NULL, IDX_TEMP1_MAX); 704 get_temp_alarm, NULL, IDX_TEMP1_MAX);
705static SENSOR_DEVICE_ATTR(temp1_crit_alarm, S_IRUGO, 705static SENSOR_DEVICE_ATTR(temp1_crit_alarm, S_IRUGO,
706 get_temp_alarm, NULL, IDX_TEMP1_CRIT); 706 get_temp_alarm, NULL, IDX_TEMP1_CRIT);
707static SENSOR_DEVICE_ATTR(temp2_input, S_IRUGO | S_IWUSR, 707static SENSOR_DEVICE_ATTR(temp2_input, S_IRUGO,
708 get_temp, NULL, IDX_TEMP2_INPUT); 708 get_temp, NULL, IDX_TEMP2_INPUT);
709static SENSOR_DEVICE_ATTR(temp2_min, S_IRUGO | S_IWUSR, get_temp, 709static SENSOR_DEVICE_ATTR(temp2_min, S_IRUGO | S_IWUSR, get_temp,
710 set_temp, IDX_TEMP2_MIN); 710 set_temp, IDX_TEMP2_MIN);
diff --git a/drivers/hwmon/emc2103.c b/drivers/hwmon/emc2103.c
index fd892dd48e4c..78002de46cb6 100644
--- a/drivers/hwmon/emc2103.c
+++ b/drivers/hwmon/emc2103.c
@@ -250,9 +250,7 @@ static ssize_t set_temp_min(struct device *dev, struct device_attribute *da,
250 if (result < 0) 250 if (result < 0)
251 return result; 251 return result;
252 252
253 val = DIV_ROUND_CLOSEST(val, 1000); 253 val = clamp_val(DIV_ROUND_CLOSEST(val, 1000), -63, 127);
254 if ((val < -63) || (val > 127))
255 return -EINVAL;
256 254
257 mutex_lock(&data->update_lock); 255 mutex_lock(&data->update_lock);
258 data->temp_min[nr] = val; 256 data->temp_min[nr] = val;
@@ -274,9 +272,7 @@ static ssize_t set_temp_max(struct device *dev, struct device_attribute *da,
274 if (result < 0) 272 if (result < 0)
275 return result; 273 return result;
276 274
277 val = DIV_ROUND_CLOSEST(val, 1000); 275 val = clamp_val(DIV_ROUND_CLOSEST(val, 1000), -63, 127);
278 if ((val < -63) || (val > 127))
279 return -EINVAL;
280 276
281 mutex_lock(&data->update_lock); 277 mutex_lock(&data->update_lock);
282 data->temp_max[nr] = val; 278 data->temp_max[nr] = val;
@@ -390,15 +386,14 @@ static ssize_t set_fan_target(struct device *dev, struct device_attribute *da,
390{ 386{
391 struct emc2103_data *data = emc2103_update_device(dev); 387 struct emc2103_data *data = emc2103_update_device(dev);
392 struct i2c_client *client = to_i2c_client(dev); 388 struct i2c_client *client = to_i2c_client(dev);
393 long rpm_target; 389 unsigned long rpm_target;
394 390
395 int result = kstrtol(buf, 10, &rpm_target); 391 int result = kstrtoul(buf, 10, &rpm_target);
396 if (result < 0) 392 if (result < 0)
397 return result; 393 return result;
398 394
399 /* Datasheet states 16384 as maximum RPM target (table 3.2) */ 395 /* Datasheet states 16384 as maximum RPM target (table 3.2) */
400 if ((rpm_target < 0) || (rpm_target > 16384)) 396 rpm_target = clamp_val(rpm_target, 0, 16384);
401 return -EINVAL;
402 397
403 mutex_lock(&data->update_lock); 398 mutex_lock(&data->update_lock);
404 399
diff --git a/drivers/hwmon/gpio-fan.c b/drivers/hwmon/gpio-fan.c
index ba35e4d530b5..2566c43dd1e9 100644
--- a/drivers/hwmon/gpio-fan.c
+++ b/drivers/hwmon/gpio-fan.c
@@ -538,7 +538,7 @@ static int gpio_fan_probe(struct platform_device *pdev)
538 538
539 /* Make this driver part of hwmon class. */ 539 /* Make this driver part of hwmon class. */
540 fan_data->hwmon_dev = hwmon_device_register_with_groups(&pdev->dev, 540 fan_data->hwmon_dev = hwmon_device_register_with_groups(&pdev->dev,
541 "gpio-fan", fan_data, 541 "gpio_fan", fan_data,
542 gpio_fan_groups); 542 gpio_fan_groups);
543 if (IS_ERR(fan_data->hwmon_dev)) 543 if (IS_ERR(fan_data->hwmon_dev))
544 return PTR_ERR(fan_data->hwmon_dev); 544 return PTR_ERR(fan_data->hwmon_dev);
diff --git a/drivers/hwmon/ntc_thermistor.c b/drivers/hwmon/ntc_thermistor.c
index e76feb86a1d4..ae66f42c4d6d 100644
--- a/drivers/hwmon/ntc_thermistor.c
+++ b/drivers/hwmon/ntc_thermistor.c
@@ -163,6 +163,18 @@ static int ntc_adc_iio_read(struct ntc_thermistor_platform_data *pdata)
163} 163}
164 164
165static const struct of_device_id ntc_match[] = { 165static const struct of_device_id ntc_match[] = {
166 { .compatible = "murata,ncp15wb473",
167 .data = &ntc_thermistor_id[0] },
168 { .compatible = "murata,ncp18wb473",
169 .data = &ntc_thermistor_id[1] },
170 { .compatible = "murata,ncp21wb473",
171 .data = &ntc_thermistor_id[2] },
172 { .compatible = "murata,ncp03wb473",
173 .data = &ntc_thermistor_id[3] },
174 { .compatible = "murata,ncp15wl333",
175 .data = &ntc_thermistor_id[4] },
176
177 /* Usage of vendor name "ntc" is deprecated */
166 { .compatible = "ntc,ncp15wb473", 178 { .compatible = "ntc,ncp15wb473",
167 .data = &ntc_thermistor_id[0] }, 179 .data = &ntc_thermistor_id[0] },
168 { .compatible = "ntc,ncp18wb473", 180 { .compatible = "ntc,ncp18wb473",
@@ -500,7 +512,7 @@ static int ntc_thermistor_probe(struct platform_device *pdev)
500 } 512 }
501 513
502 dev_info(&pdev->dev, "Thermistor type: %s successfully probed.\n", 514 dev_info(&pdev->dev, "Thermistor type: %s successfully probed.\n",
503 pdev->name); 515 pdev_id->name);
504 516
505 return 0; 517 return 0;
506err_after_sysfs: 518err_after_sysfs:
@@ -534,7 +546,7 @@ static struct platform_driver ntc_thermistor_driver = {
534 546
535module_platform_driver(ntc_thermistor_driver); 547module_platform_driver(ntc_thermistor_driver);
536 548
537MODULE_DESCRIPTION("NTC Thermistor Driver"); 549MODULE_DESCRIPTION("NTC Thermistor Driver from Murata");
538MODULE_AUTHOR("MyungJoo Ham <myungjoo.ham@samsung.com>"); 550MODULE_AUTHOR("MyungJoo Ham <myungjoo.ham@samsung.com>");
539MODULE_LICENSE("GPL"); 551MODULE_LICENSE("GPL");
540MODULE_ALIAS("platform:ntc-thermistor"); 552MODULE_ALIAS("platform:ntc-thermistor");
diff --git a/drivers/hwmon/w83l786ng.c b/drivers/hwmon/w83l786ng.c
index 6ed76ceb9270..32487c19cbfc 100644
--- a/drivers/hwmon/w83l786ng.c
+++ b/drivers/hwmon/w83l786ng.c
@@ -249,7 +249,7 @@ static ssize_t show_##reg(struct device *dev, struct device_attribute *attr, \
249 int nr = to_sensor_dev_attr(attr)->index; \ 249 int nr = to_sensor_dev_attr(attr)->index; \
250 struct w83l786ng_data *data = w83l786ng_update_device(dev); \ 250 struct w83l786ng_data *data = w83l786ng_update_device(dev); \
251 return sprintf(buf, "%d\n", \ 251 return sprintf(buf, "%d\n", \
252 FAN_FROM_REG(data->fan[nr], DIV_FROM_REG(data->fan_div[nr]))); \ 252 FAN_FROM_REG(data->reg[nr], DIV_FROM_REG(data->fan_div[nr]))); \
253} 253}
254 254
255show_fan_reg(fan); 255show_fan_reg(fan);