Skip to content

Commit

Permalink
Merge branch 'smsc47b397-new-id' into release
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark M. Hoffman committed May 1, 2008
2 parents 1852448 + 8093077 commit 4f02f82
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions drivers/hwmon/smsc47b397.c
Original file line number Diff line number Diff line change
Expand Up @@ -335,11 +335,23 @@ static int __init smsc47b397_device_add(unsigned short address)
static int __init smsc47b397_find(unsigned short *addr)
{
u8 id, rev;
char *name;

superio_enter();
id = force_id ? force_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;
}
Expand All @@ -352,8 +364,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;
Expand Down

0 comments on commit 4f02f82

Please sign in to comment.