From 6793b0cdbdae47d39b97d0fcfce10c1af523dede Mon Sep 17 00:00:00 2001 From: Jean Delvare Date: Wed, 12 May 2004 19:41:37 +0000 Subject: [PATCH] Fix double detection of ISA chips. No, don't ask for drivers, we're busy. git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@2526 7894878c-1315-0410-8ee3-d5d059ff63e0 --- prog/detect/sensors-detect | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) 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"; }