mirror of
https://github.com/lm-sensors/lm-sensors.git
synced 2026-10-25 12:14:33 +00:00
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
This commit is contained in:
1 parent
afed959df6
commit
e4870c50f9
1 file changed
+7
-7
+7
-7
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user