diff --git a/CHANGES b/CHANGES index 29255a90..5d2773a1 100644 --- a/CHANGES +++ b/CHANGES @@ -16,6 +16,7 @@ SVN HEAD Add support for Fintek F71889ED Add support for ITE IT8721F Fix Maxim MAX6690 support + Fix handling of duplicate detections 3.1.2 (2010-02-02) libsensors: Support upcoming sysfs path to i2c adapters diff --git a/prog/detect/sensors-detect b/prog/detect/sensors-detect index 61b0061f..f2a69e1f 100755 --- a/prog/detect/sensors-detect +++ b/prog/detect/sensors-detect @@ -3003,6 +3003,15 @@ sub add_i2c_to_chips_detected push @{$chips_detected{$chipdriver}}, $datahash; } +# Fake i2c drivers such as "not-a-sensor" or "use-isa-instead" have to be +# inserted so that confidence comparison can be performed. But then we have +# to filter them out so that the user doesn't get confused. +sub filter_out_fake_i2c_drivers +{ + delete $chips_detected{"not-a-sensor"}; + delete $chips_detected{"use-isa-instead"}; +} + # This adds a detection to the above structure. # $_[0]: chip driver # $_[1]: reference to data hash @@ -3190,9 +3199,6 @@ sub probe_free_i2c_address } print ")\n"; - return if ($chip->{driver} eq "not-a-sensor" - || $chip->{driver} eq "use-isa-instead"); - $new_hash = { conf => $conf, i2c_addr => $addr, @@ -5986,6 +5992,7 @@ sub main next unless exists $i2c_adapters[$dev_nr]; scan_i2c_adapter($dev_nr, $by_default); } + filter_out_fake_i2c_drivers(); } if (!keys %chips_detected) {