diff --git a/CHANGES b/CHANGES index 51a3a706..f8a2c331 100644 --- a/CHANGES +++ b/CHANGES @@ -6,6 +6,8 @@ SVN HEAD physical device. This change is required to survive the planned struct class_dev removal from future 2.6 kernels. Add support for the SMSC LPC47M292 fans (prefix smsc47m2) + Recognize i2c-isa-based devices as such even after class_dev + is gone Man page i2cdetect.8: Scanning range can be restricted Module bmcsensors: Fix debugging messages Module i2c-ali1563: Improve the status messages (2.6 backport) diff --git a/lib/sysfs.c b/lib/sysfs.c index 9854d3e9..bbb2b735 100644 --- a/lib/sysfs.c +++ b/lib/sysfs.c @@ -75,18 +75,23 @@ static int sensors_read_one_sysfs_chip(struct sysfs_device *dev) if (sscanf(dev->name, "%d-%x", &entry.name.bus, &entry.name.addr) == 2) { /* find out if legacy ISA or not */ - snprintf(bus_path, sizeof(bus_path), + if (entry.name.bus == 9191) + entry.name.bus = SENSORS_CHIP_NAME_BUS_ISA; + else { + snprintf(bus_path, sizeof(bus_path), "%s/class/i2c-adapter/i2c-%d/device/name", sensors_sysfs_mount, entry.name.bus); - if ((bus_attr = sysfs_open_attribute(bus_path))) { - if (sysfs_read_attribute(bus_attr)) - return -SENSORS_ERR_PARSE; + if ((bus_attr = sysfs_open_attribute(bus_path))) { + if (sysfs_read_attribute(bus_attr)) + return -SENSORS_ERR_PARSE; - if (bus_attr->value && !strncmp(bus_attr->value, "ISA ", 4)) - entry.name.bus = SENSORS_CHIP_NAME_BUS_ISA; + if (bus_attr->value + && !strncmp(bus_attr->value, "ISA ", 4)) + entry.name.bus = SENSORS_CHIP_NAME_BUS_ISA; - sysfs_close_attribute(bus_attr); + sysfs_close_attribute(bus_attr); + } } } else if (sscanf(dev->name, "%*[a-z0-9_].%d", &entry.name.addr) == 1) { /* must be new ISA (platform driver) */