diff --git a/prog/detect/sensors-detect b/prog/detect/sensors-detect index 7b0fe8ea..2afc9247 100755 --- a/prog/detect/sensors-detect +++ b/prog/detect/sensors-detect @@ -2390,6 +2390,8 @@ sub add_isa_to_chips_detected # Find out whether our new entry should go into the detected or the # misdetected list. We only compare main isa_addr here, of course. + # (Khali 2004-05-12) If the driver is the same, the "misdetected" + # entry is simply deleted; same we do for I2C chips. foreach $main_entry (@chips_detected) { $detected_ref = $main_entry->{detected}; $misdetected_ref = $main_entry->{misdetected}; @@ -2397,9 +2399,11 @@ sub add_isa_to_chips_detected if (exists $detected_ref->[$i]->{isa_addr} and $detected_ref->[$i]->{isa_addr} == $datahash->{isa_addr}) { if ($detected_ref->[$i]->{conf} >= $datahash->{conf}) { - push @$new_misdetected_ref, $datahash; + push @$new_misdetected_ref, $datahash + unless $main_entry->{driver} eq $chipdriver; } else { - push @$misdetected_ref,$detected_ref->[$i]; + push @$misdetected_ref,$detected_ref->[$i] + unless $main_entry->{driver} eq $chipdriver; splice @$detected_ref, $i,1; push @$new_detected_ref, $datahash; } @@ -4353,7 +4357,7 @@ sub generate_modprobes foreach $chip (@chips_detected) { next if not @{$chip->{detected}}; if ($chip->{driver} eq "to-be-written") { - $modprobes .= "# no driver for $chip->{detected}[0]{chipname} yet, ask us for one!\n"; + $modprobes .= "# no driver for $chip->{detected}[0]{chipname} yet\n"; } else { $modprobes .= "modprobe $chip->{driver}\n"; }