]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/hwmon/smsc47b397.c
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
[linux-2.6-omap-h63xx.git] / drivers / hwmon / smsc47b397.c
index 943abbd95ab57eb50cb50f3bccbe6318eafb9256..45266b30ce1d760f800b79ea6f59dbd7a27d75b3 100644 (file)
@@ -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;