Changeset 5224
- Timestamp:
- 05/02/08 14:04:30 (2 months ago)
- Files:
-
- lm-sensors/trunk/prog/detect/sensors-detect (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
lm-sensors/trunk/prog/detect/sensors-detect
r5213 r5224 5571 5571 } 5572 5572 5573 # $_[0]: 1 if ISA bus is prefered, 0 for SMBus5574 5573 # We build here an array adapters, indexed on the number the adapter has 5575 5574 # at this moment (we assume only loaded adapters are interesting at all; … … 5583 5582 sub generate_modprobes 5584 5583 { 5585 my ($prefer_isa) = @_;5586 5587 5584 my ($chip,$detection,$nr,$i,@optionlist,@probelist,$driver,$isa,$adap); 5588 5585 my $ipmi = 0; … … 5599 5596 if (exists $detection->{i2c_driver} and 5600 5597 not exists $i2c_adapters[$detection->{i2c_devnr}]->{nr_later} and 5601 not (exists $detection->{isa_addr} and $prefer_isa)) {5598 not exists $detection->{isa_addr}) { # Always use ISA access if possible 5602 5599 foreach $adap (@i2c_adapters) { 5603 5600 next unless exists $adap->{driver}; … … 5605 5602 } 5606 5603 } 5607 if (exists $detection->{isa_addr} and 5608 not (exists $detection->{i2c_driver} and not $prefer_isa)) { 5604 if (exists $detection->{isa_addr}) { 5609 5605 $isa=1; 5610 5606 } … … 5680 5676 exists $i2c_adapters[$detection->{i2c_devnr}]->{nr_later}; 5681 5677 push @optionlist, -1, $detection->{isa_addr} 5682 if exists $detection->{isa_addr} and $isa;5678 if exists $detection->{isa_addr}; 5683 5679 } 5684 5680 … … 5687 5683 if (exists $detection->{i2c_driver} and 5688 5684 exists $detection->{isa_addr} and 5689 exists $i2c_adapters[$detection->{i2c_devnr}]->{nr_later} and 5690 $isa) { 5691 if ($prefer_isa) { 5692 push @optionlist, $i2c_adapters[$detection->{i2c_devnr}]->{nr_later}, 5693 $detection->{i2c_addr}; 5694 } else { 5695 push @optionlist, -1, $detection->{isa_addr} 5696 } 5685 exists $i2c_adapters[$detection->{i2c_devnr}]->{nr_later}) { 5686 push @optionlist, $i2c_adapters[$detection->{i2c_devnr}]->{nr_later}, 5687 $detection->{i2c_addr}; 5697 5688 } 5698 5689 } … … 5916 5907 print "\n"; 5917 5908 5918 my ($modprobes, $configfile) = generate_modprobes 1; # 1 == prefer ISA5909 my ($modprobes, $configfile) = generate_modprobes(); 5919 5910 5920 5911 if (defined $configfile) {
