From e4870c50f987bb9f6533fa051d2df3602a66484d Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Sun, 16 Mar 2008 12:51:18 +0000 Subject: [PATCH] The platform case acts as a fallback solution so it must be last in the list. git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@5145 7894878c-1315-0410-8ee3-d5d059ff63e0 --- lib/sysfs.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/sysfs.c b/lib/sysfs.c index 2a6bce0b..bc8e1535 100644 --- a/lib/sysfs.c +++ b/lib/sysfs.c @@ -524,19 +524,19 @@ static int sensors_read_one_sysfs_chip(const char *dev_path, /* SPI */ entry.chip.bus.type = SENSORS_BUS_TYPE_SPI; } else - if ((!subsys || !strcmp(subsys, "platform"))) { - /* must be new ISA (platform driver) */ - if (sscanf(dev_name, "%*[a-z0-9_].%d", &entry.chip.addr) != 1) - entry.chip.addr = 0; - entry.chip.bus.type = SENSORS_BUS_TYPE_ISA; - entry.chip.bus.nr = 0; - } else if ((!subsys || !strcmp(subsys, "pci")) && sscanf(dev_name, "%x:%x:%x.%x", &domain, &bus, &slot, &fn) == 4) { /* PCI */ entry.chip.addr = (domain << 16) + (bus << 8) + (slot << 3) + fn; entry.chip.bus.type = SENSORS_BUS_TYPE_PCI; entry.chip.bus.nr = 0; + } else + if ((!subsys || !strcmp(subsys, "platform"))) { + /* must be new ISA (platform driver) */ + if (sscanf(dev_name, "%*[a-z0-9_].%d", &entry.chip.addr) != 1) + entry.chip.addr = 0; + entry.chip.bus.type = SENSORS_BUS_TYPE_ISA; + entry.chip.bus.nr = 0; } else { /* Ignore unknown device */ err = 0;