diff options
Diffstat (limited to 'drivers/hwmon')
-rw-r--r-- | drivers/hwmon/w83627ehf.c | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/drivers/hwmon/w83627ehf.c b/drivers/hwmon/w83627ehf.c index 699592855bd8..075164dd65a7 100644 --- a/drivers/hwmon/w83627ehf.c +++ b/drivers/hwmon/w83627ehf.c | |||
@@ -1202,8 +1202,7 @@ static void w83627ehf_device_remove_files(struct device *dev) | |||
1202 | device_remove_file(dev, &sda_temp[i].dev_attr); | 1202 | device_remove_file(dev, &sda_temp[i].dev_attr); |
1203 | 1203 | ||
1204 | device_remove_file(dev, &dev_attr_name); | 1204 | device_remove_file(dev, &dev_attr_name); |
1205 | if (data->vid != 0x3f) | 1205 | device_remove_file(dev, &dev_attr_cpu0_vid); |
1206 | device_remove_file(dev, &dev_attr_cpu0_vid); | ||
1207 | } | 1206 | } |
1208 | 1207 | ||
1209 | /* Get the monitoring functions started */ | 1208 | /* Get the monitoring functions started */ |
@@ -1303,11 +1302,16 @@ static int __devinit w83627ehf_probe(struct platform_device *pdev) | |||
1303 | } | 1302 | } |
1304 | } | 1303 | } |
1305 | 1304 | ||
1306 | data->vid = superio_inb(sio_data->sioreg, SIO_REG_VID_DATA) & 0x3f; | 1305 | data->vid = superio_inb(sio_data->sioreg, SIO_REG_VID_DATA); |
1306 | if (sio_data->kind == w83627ehf) /* 6 VID pins only */ | ||
1307 | data->vid &= 0x3f; | ||
1308 | |||
1309 | err = device_create_file(dev, &dev_attr_cpu0_vid); | ||
1310 | if (err) | ||
1311 | goto exit_release; | ||
1307 | } else { | 1312 | } else { |
1308 | dev_info(dev, "VID pins in output mode, CPU VID not " | 1313 | dev_info(dev, "VID pins in output mode, CPU VID not " |
1309 | "available\n"); | 1314 | "available\n"); |
1310 | data->vid = 0x3f; | ||
1311 | } | 1315 | } |
1312 | 1316 | ||
1313 | /* fan4 and fan5 share some pins with the GPIO and serial flash */ | 1317 | /* fan4 and fan5 share some pins with the GPIO and serial flash */ |
@@ -1390,12 +1394,6 @@ static int __devinit w83627ehf_probe(struct platform_device *pdev) | |||
1390 | if (err) | 1394 | if (err) |
1391 | goto exit_remove; | 1395 | goto exit_remove; |
1392 | 1396 | ||
1393 | if (data->vid != 0x3f) { | ||
1394 | err = device_create_file(dev, &dev_attr_cpu0_vid); | ||
1395 | if (err) | ||
1396 | goto exit_remove; | ||
1397 | } | ||
1398 | |||
1399 | data->hwmon_dev = hwmon_device_register(dev); | 1397 | data->hwmon_dev = hwmon_device_register(dev); |
1400 | if (IS_ERR(data->hwmon_dev)) { | 1398 | if (IS_ERR(data->hwmon_dev)) { |
1401 | err = PTR_ERR(data->hwmon_dev); | 1399 | err = PTR_ERR(data->hwmon_dev); |