From 7566fa5b1cd0cadca117707c7817ff6cbbe46fca Mon Sep 17 00:00:00 2001 From: "Darrick J. Wong" Date: Thu, 10 Apr 2008 23:24:57 +0000 Subject: [PATCH] Subject: [PATCH 1/4] libsensors: Detect OpenFirmware hwmon devices On a QS22 blade, the BMC containing the (ibmpex) power meters is enumerated via Open Firmware. Check for "of_platform" to handle this case. Signed-off-by: Darrick J. Wong git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@5174 7894878c-1315-0410-8ee3-d5d059ff63e0 --- lib/sysfs.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/sysfs.c b/lib/sysfs.c index 863adbff..96f55dc7 100644 --- a/lib/sysfs.c +++ b/lib/sysfs.c @@ -532,7 +532,8 @@ static int sensors_read_one_sysfs_chip(const char *dev_path, entry.chip.bus.type = SENSORS_BUS_TYPE_PCI; entry.chip.bus.nr = 0; } else - if ((!subsys || !strcmp(subsys, "platform"))) { + if ((!subsys || !strcmp(subsys, "platform") || + !strcmp(subsys, "of_platform"))) { /* must be new ISA (platform driver) */ if (sscanf(dev_name, "%*[a-z0-9_].%d", &entry.chip.addr) != 1) entry.chip.addr = 0;