From 38d16d299dc05ef3e9e76fac6d1066f54232d17a Mon Sep 17 00:00:00 2001 From: Jean Delvare Date: Mon, 24 Sep 2007 15:22:01 +0000 Subject: [PATCH] Add support for platform devices with no ID. git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4878 7894878c-1315-0410-8ee3-d5d059ff63e0 --- lib/sysfs.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/sysfs.c b/lib/sysfs.c index a4655120..2e5f3d52 100644 --- a/lib/sysfs.c +++ b/lib/sysfs.c @@ -404,8 +404,12 @@ static int sensors_read_one_sysfs_chip(struct sysfs_device *dev) entry.chip.addr = (domain << 16) + (bus << 8) + (slot << 3) + fn; entry.chip.bus.type = SENSORS_BUS_TYPE_PCI; entry.chip.bus.nr = 0; - } else - goto exit_free; + } else { + /* platform device with no id? */ + entry.chip.bus.type = SENSORS_BUS_TYPE_ISA; + entry.chip.bus.nr = 0; + entry.chip.addr = 0; + } if (sensors_read_dynamic_chip(&entry, dev) < 0) goto exit_free;