aboutsummaryrefslogtreecommitdiffstats
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);
174 REG: count of 90kHz pulses / revolution */ 174 REG: count of 90kHz pulses / revolution */
175static int fan_from_reg(u16 reg) 175static int fan_from_reg(u16 reg)
176{ 176{
177 if (reg == 0 || reg == 0xffff)
178 return 0;
177 return 90000 * 60 / reg; 179 return 90000 * 60 / reg;
178} 180}
179 181
@@ -333,7 +335,7 @@ static int __init smsc47b397_find(unsigned short *addr)
333 superio_enter(); 335 superio_enter();
334 id = superio_inb(SUPERIO_REG_DEVID); 336 id = superio_inb(SUPERIO_REG_DEVID);
335 337
336 if ((id != 0x6f) && (id != 0x81)) { 338 if ((id != 0x6f) && (id != 0x81) && (id != 0x85)) {
337 superio_exit(); 339 superio_exit();
338 return -ENODEV; 340 return -ENODEV;
339 } 341 }
@@ -346,7 +348,8 @@ static int __init smsc47b397_find(unsigned short *addr)
346 348
347 printk(KERN_INFO DRVNAME ": found SMSC %s " 349 printk(KERN_INFO DRVNAME ": found SMSC %s "
348 "(base address 0x%04x, revision %u)\n", 350 "(base address 0x%04x, revision %u)\n",
349 id == 0x81 ? "SCH5307-NS" : "LPC47B397-NC", *addr, rev); 351 id == 0x81 ? "SCH5307-NS" : id == 0x85 ? "SCH5317" :
352 "LPC47B397-NC", *addr, rev);
350 353
351 superio_exit(); 354 superio_exit();
352 return 0; 355 return 0;