2
0
mirror of https://github.com/lm-sensors/lm-sensors synced 2025-08-29 13:28:01 +00:00

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
This commit is contained in:
Jean Delvare 2004-05-12 19:41:37 +00:00
parent 0436eca28b
commit 6793b0cdbd

View File

@ -2390,6 +2390,8 @@ sub add_isa_to_chips_detected
# Find out whether our new entry should go into the detected or the # Find out whether our new entry should go into the detected or the
# misdetected list. We only compare main isa_addr here, of course. # 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) { foreach $main_entry (@chips_detected) {
$detected_ref = $main_entry->{detected}; $detected_ref = $main_entry->{detected};
$misdetected_ref = $main_entry->{misdetected}; $misdetected_ref = $main_entry->{misdetected};
@ -2397,9 +2399,11 @@ sub add_isa_to_chips_detected
if (exists $detected_ref->[$i]->{isa_addr} and if (exists $detected_ref->[$i]->{isa_addr} and
$detected_ref->[$i]->{isa_addr} == $datahash->{isa_addr}) { $detected_ref->[$i]->{isa_addr} == $datahash->{isa_addr}) {
if ($detected_ref->[$i]->{conf} >= $datahash->{conf}) { if ($detected_ref->[$i]->{conf} >= $datahash->{conf}) {
push @$new_misdetected_ref, $datahash; push @$new_misdetected_ref, $datahash
unless $main_entry->{driver} eq $chipdriver;
} else { } else {
push @$misdetected_ref,$detected_ref->[$i]; push @$misdetected_ref,$detected_ref->[$i]
unless $main_entry->{driver} eq $chipdriver;
splice @$detected_ref, $i,1; splice @$detected_ref, $i,1;
push @$new_detected_ref, $datahash; push @$new_detected_ref, $datahash;
} }
@ -4353,7 +4357,7 @@ sub generate_modprobes
foreach $chip (@chips_detected) { foreach $chip (@chips_detected) {
next if not @{$chip->{detected}}; next if not @{$chip->{detected}};
if ($chip->{driver} eq "to-be-written") { 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 { } else {
$modprobes .= "modprobe $chip->{driver}\n"; $modprobes .= "modprobe $chip->{driver}\n";
} }