]> err.no Git - linux-2.6/commitdiff
hwmon: (smsc47b397) add a new chip id (0x8c)
authorCraig Kelley <namonai@gmail.com>
Fri, 29 Feb 2008 17:24:44 +0000 (10:24 -0700)
committerMark M. Hoffman <mhoffman@lightlink.com>
Sun, 2 Mar 2008 19:21:35 +0000 (14:21 -0500)
Added a new ID (0x8c) for the smsc47b397 hardware monitor driver.
This ID is used by HP in, at least, their dc7700 line.

Signed-off-by: Craig Kelley <namonai@gmail.com>
Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
drivers/hwmon/smsc47b397.c

index 0b57d2ea2cf714493dc9174e614190036b04ca09..54187bf25d34e695f8b82e6d5db388094e7ed440 100644 (file)
@@ -331,11 +331,23 @@ exit:
 static int __init smsc47b397_find(unsigned short *addr)
 {
        u8 id, rev;
+       char *name;
 
        superio_enter();
        id = superio_inb(SUPERIO_REG_DEVID);
 
-       if ((id != 0x6f) && (id != 0x81) && (id != 0x85)) {
+       switch(id) {
+       case 0x81:
+               name = "SCH5307-NS";
+               break;
+       case 0x6f:
+               name = "LPC47B397-NC";
+               break;
+       case 0x85:
+       case 0x8c:
+               name = "SCH5317";
+               break;
+       default:
                superio_exit();
                return -ENODEV;
        }
@@ -348,8 +360,7 @@ 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" : id == 0x85 ? "SCH5317" :
-              "LPC47B397-NC", *addr, rev);
+               name, *addr, rev);
 
        superio_exit();
        return 0;