3a7e0ed487
as the acpi thermal_zone driver (bz 437637)
32 lines
1.1 KiB
Diff
32 lines
1.1 KiB
Diff
Index: lib/sysfs.c
|
|
===================================================================
|
|
--- lib/sysfs.c (revision 5142)
|
|
+++ lib/sysfs.c (working copy)
|
|
@@ -524,19 +524,19 @@
|
|
/* SPI */
|
|
entry.chip.bus.type = SENSORS_BUS_TYPE_SPI;
|
|
} 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
|
|
- 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 {
|
|
/* Ignore unknown device */
|
|
err = 0;
|