From e9fccf7d01dd94a13560f31cac06ef070cf5e11c Mon Sep 17 00:00:00 2001 From: Jean Delvare Date: Thu, 16 Aug 2007 09:57:56 +0000 Subject: [PATCH] Don't handle the isa bus in sensors_parse_i2cbus_name(). We really don't need to, as there is a single ISA bus, there's no need for substituting anything. git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@4674 7894878c-1315-0410-8ee3-d5d059ff63e0 --- lib/data.c | 4 ---- lib/sysfs.c | 10 ++++------ 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/lib/data.c b/lib/data.c index 5bc248b8..157a3b6b 100644 --- a/lib/data.c +++ b/lib/data.c @@ -190,10 +190,6 @@ int sensors_parse_i2cbus_name(const char *name, int *res) { int i; - if (! strcmp(name,"isa")) { - *res = SENSORS_CHIP_NAME_BUS_ISA; - return 0; - } if (strncmp(name,"i2c-",4)) { return -SENSORS_ERR_BUS_NAME; } diff --git a/lib/sysfs.c b/lib/sysfs.c index da5a55a4..09042b17 100644 --- a/lib/sysfs.c +++ b/lib/sysfs.c @@ -374,17 +374,15 @@ int sensors_read_sysfs_bus(void) (attr = sysfs_get_device_attr(dev, "name")))) continue; + if (sscanf(clsdev->name, "i2c-%d", &entry.number) != 1 || + entry.number == 9191) /* legacy ISA */ + continue; + /* NB: attr->value[attr->len-1] == '\n'; chop that off */ entry.adapter = strndup(attr->value, attr->len - 1); if (!entry.adapter) sensors_fatal_error(__FUNCTION__, "out of memory"); - if (!strncmp(entry.adapter, "ISA ", 4)) { - entry.number = SENSORS_CHIP_NAME_BUS_ISA; - } else if (sscanf(clsdev->name, "i2c-%d", &entry.number) != 1) { - continue; - } - sensors_add_proc_bus(&entry); }