diff --git a/CHANGES b/CHANGES index db02cb00..dc899adc 100644 --- a/CHANGES +++ b/CHANGES @@ -2,6 +2,9 @@ lm_sensors CHANGES file ----------------------- SVN HEAD + Library: Do not skip i2c adapters with only a class device and no + physical device. This change is required to survive the + planned struct class_dev removal from future 2.6 kernels. 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 b2d06683..9854d3e9 100644 --- a/lib/sysfs.c +++ b/lib/sysfs.c @@ -195,13 +195,12 @@ int sensors_read_sysfs_bus(void) struct sysfs_device *dev; struct sysfs_attribute *attr; - if (!(dev = sysfs_get_classdev_device(clsdev))) - continue; /* Get the adapter name from the classdev "name" attribute * (Linux 2.6.20 and later). If it fails, fall back to * the device "name" attribute (for older kernels). */ if (!(attr = sysfs_get_classdev_attr(clsdev, "name")) - && !(attr = sysfs_get_device_attr(dev, "name"))) + && !((dev = sysfs_get_classdev_device(clsdev)) && + (attr = sysfs_get_device_attr(dev, "name")))) continue; /* NB: attr->value[attr->len-1] == '\n'; chop that off */