diff --git a/CHANGES b/CHANGES index 5c4586c5..2f7e0bcb 100644 --- a/CHANGES +++ b/CHANGES @@ -17,6 +17,7 @@ SVN-HEAD Drop support for Linux 2.4 (#2325) Handle special case chips more efficiently Fix SMBus detection of W83627EHF and W83627DHG + Get I2C adapter driver names from sysfs (#2328) 3.0.3 (2008-09-28) libsensors: Avoid namespace pollution diff --git a/prog/detect/sensors-detect b/prog/detect/sensors-detect index 800f9c23..ae354a1c 100755 --- a/prog/detect/sensors-detect +++ b/prog/detect/sensors-detect @@ -2366,7 +2366,11 @@ sub initialize_i2c_adapters_list $entry->{'name'} = sysfs_device_attribute("${class_dir}/i2c-$1", "name") || sysfs_device_attribute("${class_dir}/i2c-$1/device", "name"); next if $entry->{'name'} eq "ISA main adapter"; - $entry->{'driver'} = find_adapter_driver($entry->{'name'}); + + # First try to get the I2C adapter driver name from sysfs, and if it + # fails, fall back to searching our list of known I2C adapters. + $entry->{'driver'} = sysfs_device_driver("${class_dir}/i2c-$1/device") + || find_adapter_driver($entry->{'name'}); $i2c_adapters[$1] = $entry; } closedir(ADAPTERS);