Changeset 5443

Show
Ignore:
Timestamp:
11/27/08 18:53:36 (4 years ago)
Author:
khali
Message:

Don't create module options for bus drivers we don't even need to load.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • lm-sensors/branches/lm-sensors-3.0.0/prog/detect/sensors-detect

    r5442 r5443  
    51425142  my ($modprobes, $configfile); 
    51435143 
     5144  foreach $chip (@chips_detected) { 
     5145    foreach $detection (@{$chip->{detected}}) { 
     5146      # Tag adapters which host hardware monitoring chips we want to access 
     5147      if (exists $detection->{i2c_devnr} 
     5148       && !exists $detection->{isa_addr}) { 
     5149           $i2c_adapters[$detection->{i2c_devnr}]->{used}++; 
     5150      } 
     5151 
     5152      if (exists $detection->{isa_addr}) { 
     5153           $isa = 1; 
     5154      } 
     5155    } 
     5156    if ($chip->{driver} eq "ipmisensors") { 
     5157         $ipmi = 1; 
     5158    } 
     5159  } 
     5160 
    51445161  # Handle aliases 
    51455162  # As of kernel 2.6.28, alias detection is handled by kernel drivers 
     
    51505167      foreach $detection (@{$chip->{detected}}) { 
    51515168        if (exists $detection->{i2c_driver} and 
    5152             exists $detection->{isa_addr}) { 
     5169            exists $detection->{isa_addr} and 
     5170            $i2c_adapters[$detection->{i2c_devnr}]->{used}) { 
    51535171          push @optionlist, $detection->{i2c_devnr}, 
    51545172                            $detection->{i2c_addr}; 
     
    51645182                             shift @optionlist) while @optionlist; 
    51655183      $configfile .= "\n"; 
    5166     } 
    5167   } 
    5168  
    5169   foreach $chip (@chips_detected) { 
    5170     foreach $detection (@{$chip->{detected}}) { 
    5171       # Tag adapters which host hardware monitoring chips we want to access 
    5172       if (exists $detection->{i2c_devnr} 
    5173        && !exists $detection->{isa_addr}) { 
    5174            $i2c_adapters[$detection->{i2c_devnr}]->{used}++; 
    5175       } 
    5176  
    5177       if (exists $detection->{isa_addr}) { 
    5178            $isa = 1; 
    5179       } 
    5180     } 
    5181     if ($chip->{driver} eq "ipmisensors") { 
    5182          $ipmi = 1; 
    51835184    } 
    51845185  }