Changeset 4082

Show
Ignore:
Timestamp:
08/02/06 21:53:20 (2 years ago)
Author:
khali
Message:

Kill some dead code, which dealt with the case where a driver probes
less I2C addresses by default than the script itself does. The feature
was never used, and I don't think it's particuarly useful, so removing
it for simpler code makes sense.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • lm-sensors/trunk/prog/detect/sensors-detect

    r4079 r4082  
    984984#  i2c_addrs (optional): For I2C chips, the range of valid I2C addresses to 
    985985#      probe. Recommend avoiding 0x69 because of clock chips. 
    986 #  i2c_driver_addrs (optional): For I2C chips, the range of valid I2C 
    987 #      addresses probed by the kernel driver. Strictly optional. 
    988986#  i2c_detect (optional): For I2C chips, the function to call to detect 
    989987#      this chip. The function should take two parameters: an open file 
     
    991989#  isa_addrs (optional): For ISA chips, the range of valid port addresses to 
    992990#      probe. 
    993 #  isa_driver_addrs (optional): For ISA chips, the range of valid ISA 
    994 #      addresses probed by the kernel driver. Strictly optional. 
    995991#  isa_detect (optional): For ISA chips, the function to call to detect 
    996992#      this chip. The function should take one parameter: the ISA address 
     
    25962592#  with field 'i2c_sub_addrs', containing a reference to a list of 
    25972593#       other I2C addresses (if this is an I2C detection) 
    2598 #  with field 'i2c_extra' if this is an I2C detection and the address 
    2599 #       is not normally probed by the kernel driver 
    26002594#  with field 'isa_addr' containing the ISA address this chip is on  
    26012595#       (if this is an ISA detection) 
    2602 #  with field 'isa_extra' if this is an ISA detection and the address 
    2603 #       is not normally probed by the kernel driver 
    26042596#  with field 'conf', containing the confidence level of this detection 
    26052597#  with field 'chipname', containing the chip name 
     
    27432735                          $new_misdetected_ref->[$i]->{i2c_addr})) { 
    27442736        $new_misdetected_ref->[$i]->{isa_addr} = $datahash->{isa_addr}; 
    2745         $new_misdetected_ref->[$i]->{isa_extra} = $datahash->{isa_extra}  
    2746                if exists $datahash->{isa_extra}; 
    27472737        return $new_misdetected_ref->[$i];  
    27482738      } 
     
    27672757                          $new_detected_ref->[$i]->{i2c_addr})) { 
    27682758        $new_detected_ref->[$i]->{isa_addr} = $datahash->{isa_addr}; 
    2769         $new_detected_ref->[$i]->{isa_extra} = $datahash->{isa_extra}  
    2770                if exists $datahash->{isa_extra}; 
    27712759        ($datahash) = splice (@$new_detected_ref, $i, 1); 
    27722760        $isalias=1; 
     
    28572845          i2c_devnr => $adapter_nr, 
    28582846        }; 
    2859         $new_hash->{i2c_extra} = 0  
    2860             if exists $chip->{i2c_driver_addrs} and 
    2861                not contains($addr, @{$chip->{i2c_driver_addrs}}); 
    28622847 
    28632848        printf "Client found at address 0x\%02x\n", $addr; 
     
    29082893            $new_hash->{i2c_sub_addrs} = \@chips_copy; 
    29092894          } 
    2910           $new_hash->{i2c_extra} = 0  
    2911                  if exists $chip->{i2c_driver_addrs} and 
    2912                     not contains( $addr , @{$chip->{i2c_driver_addrs}}); 
    29132895          add_i2c_to_chips_detected $chip->{driver}, $new_hash; 
    29142896        } else { 
     
    29402922                       chipname => $chip->{name} 
    29412923                     }; 
    2942       $new_hash->{isa_extra} = 0  
    2943              if exists $chip->{isa_driver_addrs} and 
    2944                 not contains ($addr, @{$chip->{isa_driver_addrs}}); 
    29452924      $new_hash = add_isa_to_chips_detected $chip->{alias_detect},$chip->{driver}, 
    29462925                                            $new_hash; 
     
    52995278       } 
    53005279       $modprobes .= "modprobe $chip->{driver}\n"; 
    5301     } 
    5302  
    5303     # Handle detects at addresses normally not probed 
    5304     foreach $detection (@{$chip->{detected}}) { 
    5305       push @probelist, $adapters[$detection->{i2c_devnr}]->{nr_later}, 
    5306                        $detection->{i2c_addr} 
    5307            if exists $detection->{i2c_addr} and 
    5308               exists $detection->{i2c_extra}; 
    5309       push @probelist, -1, $detection->{isa_addr} 
    5310            if exists $detection->{isa_addr} and 
    5311               exists $detection->{isa_extra}; 
    53125280    } 
    53135281