mirror of
https://github.com/lm-sensors/lm-sensors.git
synced 2026-11-06 15:51:34 +00:00
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:
1 parent
8e64f3890e
commit
a0d41dc880
2 files changed
+5
-3
No files matched your search
@@ -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
@@ -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 */
|
||||
|
||||
Reference in new issue
Block a user