libsensors: 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.


git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@4326 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
Jean Delvare committed 2007-02-15 11:58:53 +00:00
1 parent 8e64f3890e
commit a0d41dc880
2 files changed
+5 -3

No files matched your search

+3
View File
@@ -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)
+2 -3
View File
@@ -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 */