summaryrefslogtreecommitdiff
path: root/drivers/hwmon/smsc47b397.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/hwmon/smsc47b397.c')
-rw-r--r--drivers/hwmon/smsc47b397.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/hwmon/smsc47b397.c b/drivers/hwmon/smsc47b397.c
index 943abbd95ab5..45266b30ce1d 100644
--- a/drivers/hwmon/smsc47b397.c
+++ b/drivers/hwmon/smsc47b397.c
@@ -174,6 +174,8 @@ static SENSOR_DEVICE_ATTR(temp4_input, S_IRUGO, show_temp, NULL, 3);
REG: count of 90kHz pulses / revolution */
static int fan_from_reg(u16 reg)
{
+ if (reg == 0 || reg == 0xffff)
+ return 0;
return 90000 * 60 / reg;
}
@@ -333,7 +335,7 @@ static int __init smsc47b397_find(unsigned short *addr)
superio_enter();
id = superio_inb(SUPERIO_REG_DEVID);
- if ((id != 0x6f) && (id != 0x81)) {
+ if ((id != 0x6f) && (id != 0x81) && (id != 0x85)) {
superio_exit();
return -ENODEV;
}
@@ -346,7 +348,8 @@ static int __init smsc47b397_find(unsigned short *addr)
printk(KERN_INFO DRVNAME ": found SMSC %s "
"(base address 0x%04x, revision %u)\n",
- id == 0x81 ? "SCH5307-NS" : "LPC47B397-NC", *addr, rev);
+ id == 0x81 ? "SCH5307-NS" : id == 0x85 ? "SCH5317" :
+ "LPC47B397-NC", *addr, rev);
superio_exit();
return 0;