X-Git-Url: https://git.karo-electronics.de/?a=blobdiff_plain;f=drivers%2Fhwmon%2Fsmsc47b397.c;h=6f6d52b4fb64520f67581682acb3d63995343805;hb=874194123718e625aa96632bac457d686ba1378e;hp=f61d8f4185b243efcf7bd3fb0f10fa6284dde6d2;hpb=6585b4a71f523485ecf33e7f4569be4095d63699;p=karo-tx-linux.git diff --git a/drivers/hwmon/smsc47b397.c b/drivers/hwmon/smsc47b397.c index f61d8f4185b2..6f6d52b4fb64 100644 --- a/drivers/hwmon/smsc47b397.c +++ b/drivers/hwmon/smsc47b397.c @@ -36,6 +36,7 @@ #include #include #include +#include #include static unsigned short force_id; @@ -303,6 +304,10 @@ static int __init smsc47b397_device_add(unsigned short address) }; int err; + err = acpi_check_resource_conflict(&res); + if (err) + goto exit; + pdev = platform_device_alloc(DRVNAME, address); if (!pdev) { err = -ENOMEM; @@ -335,11 +340,23 @@ exit: 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; } @@ -352,8 +369,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;