Changeset 5449

Show
Ignore:
Timestamp:
11/27/08 22:46:01 (5 years ago)
Author:
khali
Message:

Consistently don't quote hash keys which don't need quotes. Use
single quotes when quotes are needed.

Files:
1 modified

Legend:

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

    r5448 r5449  
    22692269    next unless m/^i2c-(\d+)$/; 
    22702270    $entry = {}; # New entry 
    2271     $entry->{'name'} = sysfs_device_attribute("${class_dir}/i2c-$1", "name") 
    2272                     || sysfs_device_attribute("${class_dir}/i2c-$1/device", "name"); 
    2273     next if $entry->{'name'} eq "ISA main adapter"; 
     2271    $entry->{name} = sysfs_device_attribute("${class_dir}/i2c-$1", "name") 
     2272                  || sysfs_device_attribute("${class_dir}/i2c-$1/device", "name"); 
     2273    next if $entry->{name} eq "ISA main adapter"; 
    22742274 
    22752275    # First try to get the I2C adapter driver name from sysfs, and if it 
    22762276    # fails, fall back to searching our list of known I2C adapters. 
    2277     $entry->{'driver'} = sysfs_device_driver("${class_dir}/i2c-$1/device") 
    2278                       || find_i2c_adapter_driver($entry->{'name'}) 
    2279                       || 'UNKNOWN'; 
     2277    $entry->{driver} = sysfs_device_driver("${class_dir}/i2c-$1/device") 
     2278                    || find_i2c_adapter_driver($entry->{name}) 
     2279                    || 'UNKNOWN'; 
    22802280    $i2c_adapters[$1] = $entry; 
    22812281  } 
     
    24472447 
    24482448  # first, determine which driver if any... 
    2449   if (exists $pci_list{"1039:0016"}) { 
     2449  if (exists $pci_list{'1039:0016'}) { 
    24502450    $driver = "i2c-sis96x"; 
    2451   } elsif (exists $pci_list{"1039:0008"}) { 
     2451  } elsif (exists $pci_list{'1039:0008'}) { 
    24522452    $driver = "i2c-sis5595"; 
    24532453  } 
     
    29202920 
    29212921  foreach my $chip (@chip_ids) { 
    2922     next unless defined $chip->{'i2c_addrs'}; 
    2923     next if $chip->{'driver'} eq 'not-a-sensor'; 
    2924     foreach $addr (@{$chip->{'i2c_addrs'}}) { 
     2922    next unless defined $chip->{i2c_addrs}; 
     2923    next if $chip->{driver} eq 'not-a-sensor'; 
     2924    foreach $addr (@{$chip->{i2c_addrs}}) { 
    29252925      $used[$addr]++; 
    29262926    } 
     
    50675067        my $probecpu; 
    50685068        foreach $probecpu (@cpu) { 
    5069                 if ($probecpu->{'vendor_id'} eq 'GenuineIntel' && 
    5070                                 $probecpu->{'cpu family'} == 6 && 
    5071                                 ($probecpu->{'model'} == 14 || 
    5072                                  $probecpu->{'model'} == 15 || 
    5073                                  $probecpu->{'model'} == 0x16 || 
    5074                                  $probecpu->{'model'} == 0x17)) { 
     5069                if ($probecpu->{vendor_id} eq 'GenuineIntel' && 
     5070                                $probecpu->{cpu_family} == 6 && 
     5071                                ($probecpu->{model} == 14 || 
     5072                                 $probecpu->{model} == 15 || 
     5073                                 $probecpu->{model} == 0x16 || 
     5074                                 $probecpu->{model} == 0x17)) { 
    50755075                        return 9; 
    50765076                } 
     
    50845084        my $probecpu; 
    50855085        foreach $probecpu (@cpu) { 
    5086                 if ($probecpu->{'vendor_id'} eq 'CentaurHauls' && 
    5087                                 $probecpu->{'cpu family'} == 6 && 
    5088                                 ($probecpu->{'model'} == 0xa || 
    5089                                  $probecpu->{'model'} == 0xd)) { 
     5086                if ($probecpu->{vendor_id} eq 'CentaurHauls' && 
     5087                                $probecpu->{cpu_family} == 6 && 
     5088                                ($probecpu->{model} == 0xa || 
     5089                                 $probecpu->{model} == 0xd)) { 
    50905090                        return 9; 
    50915091                } 
     
    52875287  for (my $dev_nr = 0; $dev_nr < @i2c_adapters; $dev_nr++) { 
    52885288    next unless exists $i2c_adapters[$dev_nr]; 
    5289     my $adap = $i2c_adapters[$dev_nr]->{'name'}; 
     5289    my $adap = $i2c_adapters[$dev_nr]->{name}; 
    52905290    print "\n"; 
    52915291    print "Next adapter: $adap (i2c-$dev_nr)\n"; 
     
    53045304      @not_to_scan = parse_not_to_scan(0x03, 0x77, $inp2); 
    53055305    } 
    5306     scan_adapter($dev_nr, $adap, $i2c_adapters[$dev_nr]->{'driver'}, 
     5306    scan_adapter($dev_nr, $adap, $i2c_adapters[$dev_nr]->{driver}, 
    53075307                 \@not_to_scan) unless $inp =~ /^\s*[Nn]/; 
    53085308  }