Changeset 4267

Show
Ignore:
Timestamp:
12/21/06 09:24:01 (8 years ago)
Author:
khali
Message:

libsensors: Get the i2c adapter names from the class device's "name"
attribute, falling back to the device's "name" attribute for
compatibility only. This change is needed to match ongoing cleanups in
Linux 2.6's i2c-core. i2c adapters will soon be class devices only, the
legacy i2c_adapter devices and driver are being removed.

Location:
lm-sensors/trunk
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • lm-sensors/trunk/CHANGES

    r4265 r4267  
    1313           Add f71872f support 
    1414           Add w83627dhg support (David Holl, #2157) 
     15           Get the i2c adapter names from classdev.name 
    1516  Man page i2cdetect.8: Describe the output convention 
    1617  Man page sensors.1: Update (option -c) and clean up 
  • lm-sensors/trunk/lib/sysfs.c

    r4208 r4267  
    198198                if (!(dev = sysfs_get_classdev_device(clsdev))) 
    199199                        continue; 
    200                 if (!(attr = sysfs_get_device_attr(dev, "name"))) 
     200                /* Get the adapter name from the classdev "name" attribute 
     201                 * (Linux 2.6.20 and later). If it fails, fall back to 
     202                 * the device "name" attribute (for older kernels). */ 
     203                if (!(attr = sysfs_get_classdev_attr(clsdev, "name")) 
     204                 && !(attr = sysfs_get_device_attr(dev, "name"))) 
    201205                        continue; 
    202206