Changeset 5259

Show
Ignore:
Timestamp:
05/22/08 14:00:52 (6 months ago)
Author:
khali
Message:

Mass coding-style cleanups.

Files:

Legend:

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

    r5250 r5259  
    5858# Each entry must have a vendid (Vendor ID), devid (Device ID) and 
    5959# procid (string as appears in /proc/pci; see linux/driver/pci, 
    60 # either pci.c or oldproc.c). If no driver is written yet, set the  
     60# either pci.c or oldproc.c). If no driver is written yet, set the 
    6161# driver (Driver Name) field to "to-be-written". 
    6262# The match (Match Description) field should contain a regular expression 
    6363# matching the adapter name as it would appear in /proc/bus/i2c or /sys. 
    64 @pci_adapters = (  
    65      {  
     64@pci_adapters = ( 
     65     { 
    6666       vendid => 0x8086, 
    6767       devid  => 0x7113, 
     
    6969       driver => "i2c-piix4", 
    7070       match => qr/^SMBus PIIX4 adapter at /, 
    71      } ,  
    72      {  
     71     }, 
     72     { 
    7373       vendid => 0x8086, 
    7474       devid  => 0x7603, 
    7575       procid => "Intel 82372FB PIIX5 ACPI", 
    7676       driver => "to-be-tested", 
    77      } ,  
    78      {  
     77     }, 
     78     { 
    7979       vendid => 0x8086, 
    8080       devid  => 0x719b, 
     
    8282       driver => "i2c-piix4", 
    8383       match => qr/^SMBus PIIX4 adapter at /, 
    84      } ,  
    85      {  
     84     }, 
     85     { 
    8686       vendid => 0x8086, 
    8787       devid  => 0x2413, 
     
    8989       driver => "i2c-i801", 
    9090       match => qr/^SMBus I801 adapter at [0-9a-f]{4}/, 
    91      } ,  
    92      {  
     91     }, 
     92     { 
    9393       vendid => 0x8086, 
    9494       devid  => 0x2423, 
     
    9696       driver => "i2c-i801", 
    9797       match => qr/^SMBus I801 adapter at [0-9a-f]{4}/, 
    98      } ,  
    99      {  
     98     }, 
     99     { 
    100100       vendid => 0x8086, 
    101101       devid  => 0x2443, 
     
    103103       driver => "i2c-i801", 
    104104       match => qr/^SMBus I801 adapter at [0-9a-f]{4}/, 
    105      } ,  
    106      {  
     105     }, 
     106     { 
    107107       vendid => 0x8086, 
    108108       devid  => 0x2483, 
     
    110110       driver => "i2c-i801", 
    111111       match => qr/^SMBus I801 adapter at [0-9a-f]{4}/, 
    112      } ,  
    113      {  
     112     }, 
     113     { 
    114114       vendid => 0x8086, 
    115115       devid  => 0x24C3, 
     
    117117       driver => "i2c-i801", 
    118118       match => qr/^SMBus I801 adapter at [0-9a-f]{4}/, 
    119      } ,  
    120      {  
     119     }, 
     120     { 
    121121       vendid => 0x8086, 
    122122       devid  => 0x24D3, 
     
    124124       driver => "i2c-i801", 
    125125       match => qr/^SMBus I801 adapter at [0-9a-f]{4}/, 
    126      } ,  
    127      {  
     126     }, 
     127     { 
    128128       vendid => 0x8086, 
    129129       devid  => 0x25A4, 
     
    131131       driver => "i2c-i801", 
    132132       match => qr/^SMBus I801 adapter at [0-9a-f]{4}/, 
    133      } ,  
    134      {  
     133     }, 
     134     { 
    135135       vendid => 0x8086, 
    136136       devid  => 0x269B, 
     
    145145       driver => "i2c-i801", 
    146146       match => qr/^SMBus I801 adapter at [0-9a-f]{4}/, 
    147      } ,  
    148      {  
     147     }, 
     148     { 
    149149       vendid => 0x8086, 
    150150       devid  => 0x27DA, 
     
    152152       driver => "i2c-i801", 
    153153       match => qr/^SMBus I801 adapter at [0-9a-f]{4}/, 
    154      } ,  
    155      {  
     154     }, 
     155     { 
    156156       vendid => 0x8086, 
    157157       devid  => 0x283E, 
     
    159159       driver => "i2c-i801", 
    160160       match => qr/^SMBus I801 adapter at [0-9a-f]{4}/, 
    161      },  
    162      {  
     161     }, 
     162     { 
    163163       vendid => 0x8086, 
    164164       devid  => 0x2930, 
     
    167167       match => qr/^SMBus I801 adapter at [0-9a-f]{4}/, 
    168168     }, 
    169      {  
     169     { 
    170170       vendid => 0x8086, 
    171171       devid  => 0x5032, 
     
    173173       driver => "i2c-i801", 
    174174       match => qr/^SMBus I801 adapter at [0-9a-f]{4}/, 
    175      },   
     175     }, 
    176176     { 
    177177       vendid => 0x8086, 
     
    188188       match => qr/^SMBus I801 adapter at [0-9a-f]{4}/, 
    189189     }, 
    190      {  
     190     { 
    191191       vendid => 0x1106, 
    192192       devid  => 0x3040, 
     
    194194       driver => "i2c-via", 
    195195       match => qr/^VIA i2c/, 
    196      }
    197      {  
     196     }
     197     { 
    198198       vendid => 0x1106, 
    199199       devid  => 0x3050, 
     
    201201       driver => "i2c-viapro", 
    202202       match => qr/^SMBus V(IA|ia) Pro adapter at/, 
    203      }
    204      {  
     203     }
     204     { 
    205205       vendid => 0x1106, 
    206206       devid  => 0x3051, 
     
    208208       driver => "i2c-viapro", 
    209209       match => qr/^SMBus V(IA|ia) Pro adapter at/, 
    210      }
    211      {  
     210     }
     211     { 
    212212       vendid => 0x1106, 
    213213       devid  => 0x3057, 
     
    215215       driver => "i2c-viapro", 
    216216       match => qr/^SMBus V(IA|ia) Pro adapter at/, 
    217      }
    218      {  
     217     }
     218     { 
    219219       vendid => 0x1106, 
    220220       devid  => 0x3074, 
     
    222222       driver => "i2c-viapro", 
    223223       match => qr/^SMBus V(IA|ia) Pro adapter at/, 
    224      }
    225      {  
     224     }
     225     { 
    226226       vendid => 0x1106, 
    227227       devid  => 0x3147, 
     
    229229       driver => "i2c-viapro", 
    230230       match => qr/^SMBus V(IA|ia) Pro adapter at/, 
    231      }
    232      {  
     231     }
     232     { 
    233233       vendid => 0x1106, 
    234234       devid  => 0x3177, 
     
    236236       driver => "i2c-viapro", 
    237237       match => qr/^SMBus V(IA|ia) Pro adapter at/, 
    238      }
     238     }
    239239     { 
    240240       vendid => 0x1106, 
     
    243243       driver => "i2c-viapro", 
    244244       match => qr/^SMBus V(IA|ia) Pro adapter at/, 
    245      }
     245     }
    246246     { 
    247247       vendid => 0x1106, 
     
    250250       driver => "i2c-viapro", 
    251251       match => qr/^SMBus V(IA|ia) Pro adapter at/, 
    252      }
    253      {  
     252     }
     253     { 
    254254       vendid => 0x1106, 
    255255       devid  => 0x8235, 
     
    257257       driver => "i2c-viapro", 
    258258       match => qr/^SMBus V(IA|ia) Pro adapter at/, 
    259      }
    260      {  
     259     }
     260     { 
    261261       vendid => 0x1106, 
    262262       devid  => 0x3287, 
     
    264264       driver => "i2c-viapro", 
    265265       match => qr/^SMBus V(IA|ia) Pro adapter at/, 
    266      }
     266     }
    267267     { 
    268268       vendid => 0x1106, 
     
    277277       procid => "Silicon Integrated Systems SIS5581/5582/5597/5598 (To be written - Do not use 5595 drivers)", 
    278278       driver => "to-be-written", 
    279      }
     279     }
    280280     { 
    281281       vendid => 0x1039, 
     
    283283       procid => "Silicon Integrated Systems SIS5598 (To be written - Do not use 5595 drivers)", 
    284284       driver => "to-be-written", 
    285      }
     285     }
    286286     { 
    287287       vendid => 0x1039, 
     
    289289       procid => "Silicon Integrated Systems SIS540 (To be written - Do not use 5595 drivers)", 
    290290       driver => "to-be-written", 
    291      }
     291     }
    292292     { 
    293293       vendid => 0x1039, 
     
    296296       driver => "i2c-sis630", 
    297297       match => qr/^SMBus SIS630 adapter at [0-9a-f]{4}/, 
    298      }
     298     }
    299299     { 
    300300       vendid => 0x1039, 
     
    303303       driver => "i2c-sis630", 
    304304       match => qr/^SMBus SIS630 adapter at [0-9a-f]{4}/, 
    305      }
     305     }
    306306# 
    307307# Both Ali chips below have same PCI ID. Can't be helped. Only one should load. 
     
    328328       match => qr/^SMBus ALi 1563 Adapter @/, 
    329329     }, 
    330      {  
     330     { 
    331331       vendid => 0x1022, 
    332332       devid  => 0x740b, 
     
    335335       match => qr/^SMBus AMD756 adapter at [0-9a-f]{4}/, 
    336336     }, 
    337      {  
     337     { 
    338338       vendid => 0x1022, 
    339339       devid  => 0x7413, 
     
    342342       match => qr/^SMBus AMD766 adapter at [0-9a-f]{4}/, 
    343343     }, 
    344      {  
     344     { 
    345345       vendid => 0x1022, 
    346346       devid  => 0x7443, 
     
    349349       match => qr/^SMBus AMD768 adapter at [0-9a-f]{4}/, 
    350350     }, 
    351      {  
     351     { 
    352352       vendid => 0x1022, 
    353353       devid  => 0x746b, 
     
    356356       match => qr/^SMBus AMD8111 adapter at [0-9a-f]{4}/, 
    357357     }, 
    358      {  
     358     { 
    359359       vendid => 0x1022, 
    360360       devid  => 0x746a, 
     
    369369       driver => "i2c-amd756", 
    370370       match => qr/^SMBus nVidia nForce adapter at [0-9a-f]{4}/, 
    371      } ,  
    372      {  
     371     }, 
     372     { 
    373373       vendid => 0x10de, 
    374374       devid  => 0x0064, 
     
    376376       driver => "i2c-nforce2", 
    377377       match => qr/^SMBus nForce2 adapter at /, 
    378      },  
     378     }, 
    379379     { 
    380380       vendid => 0x10de, 
     
    383383       driver => "i2c-nforce2", 
    384384       match => qr/^SMBus nForce2 adapter at /, 
    385      },  
     385     }, 
    386386     { 
    387387       vendid => 0x10de, 
     
    390390       driver => "i2c-nforce2", 
    391391       match => qr/^SMBus nForce2 adapter at /, 
    392      },  
     392     }, 
    393393     { 
    394394       vendid => 0x10de, 
     
    397397       driver => "i2c-nforce2", 
    398398       match => qr/^SMBus nForce2 adapter at /, 
    399      },  
     399     }, 
    400400     { 
    401401       vendid => 0x10de, 
     
    404404       driver => "i2c-nforce2", 
    405405       match => qr/^SMBus nForce2 adapter at /, 
    406      },  
     406     }, 
    407407     { 
    408408       vendid => 0x10de, 
     
    446446       driver => "i2c-piix4", 
    447447       match => qr/^SMBus PIIX4 adapter at /, 
    448      } ,  
    449      {  
     448     }, 
     449     { 
    450450       vendid => 0x1055, 
    451451       devid  => 0x9463, 
     
    453453       driver => "i2c-piix4", 
    454454       match => qr/^SMBus PIIX4 adapter at /, 
    455      } ,  
    456      {  
     455     }, 
     456     { 
    457457       vendid => 0x1166, 
    458458       devid  => 0x0201, 
     
    460460       driver => "i2c-piix4", 
    461461       match => qr/^SMBus PIIX4 adapter at /, 
    462      } ,  
    463      {  
     462     }, 
     463     { 
    464464       vendid => 0x1166, 
    465465       devid  => 0x0203, 
     
    467467       driver => "i2c-piix4", 
    468468       match => qr/^SMBus PIIX4 adapter at /, 
    469      } ,  
     469     }, 
    470470     { 
    471471       vendid => 0x1166, 
     
    475475       match => qr/^SMBus PIIX4 adapter at /, 
    476476     }, 
    477      {  
     477     { 
    478478       vendid => 0x1002, 
    479479       devid  => 0x4353, 
     
    481481       driver => "i2c-piix4", 
    482482       match => qr/^SMBus PIIX4 adapter at /, 
    483      } ,  
    484      {  
     483     }, 
     484     { 
    485485       vendid => 0x1002, 
    486486       devid  => 0x4363, 
     
    488488       driver => "i2c-piix4", 
    489489       match => qr/^SMBus PIIX4 adapter at /, 
    490      } ,  
    491      {  
     490     }, 
     491     { 
    492492       vendid => 0x1002, 
    493493       devid  => 0x4372, 
     
    495495       driver => "i2c-piix4", 
    496496       match => qr/^SMBus PIIX4 adapter at /, 
    497      } ,  
    498      {  
     497     }, 
     498     { 
    499499       vendid => 0x1002, 
    500500       devid  => 0x4385, 
     
    502502       driver => "i2c-piix4", 
    503503       match => qr/^SMBus PIIX4 adapter at /, 
    504      } ,  
     504     }, 
    505505     { 
    506506       vendid => 0x100B, 
     
    546546       driver => "i2c-sis5595", 
    547547       match => qr/^SMBus SIS5595 adapter at [0-9a-f]{4}/, 
    548      }
     548     }
    549549); 
    550550 
     
    556556       driver => "i2c-sis645", 
    557557       match => qr/^SiS645 SMBus adapter at [0-9a-f]{4}/, 
    558      }
     558     }
    559559     { 
    560560       vendid => 0x1039, 
     
    563563       driver => "i2c-sis645", 
    564564       match => qr/^SiS645 SMBus adapter at 0x[0-9a-f]{4}/, 
    565      }
     565     }
    566566     { 
    567567       vendid => 0x1039, 
     
    570570       driver => "i2c-sis645", 
    571571       match => qr/^SiS645 SMBus adapter at 0x[0-9a-f]{4}/, 
    572      }
     572     }
    573573); 
    574574 
     
    580580       driver => "i2c-sis96x", 
    581581       match => qr/^SiS96x SMBus adapter at 0x[0-9a-f]{4}/, 
    582      }
     582     }
    583583); 
    584584 
    585 # This is a list of all recognized chips.  
     585# This is a list of all recognized chips. 
    586586# Each entry must have the following fields: 
    587587#  name: The full chip name 
     
    608608       name => "Myson MTP008", 
    609609       driver => "mtp008", 
    610        i2c_addrs => [0x2c..0x2e],  
     610       i2c_addrs => [0x2c..0x2e], 
    611611       i2c_detect => sub { mtp008_detect(@_); }, 
    612      }
     612     }
    613613     { 
    614614       name => "National Semiconductor LM78", 
    615615       driver => "lm78", 
    616        i2c_addrs => [0x28..0x2f],  
     616       i2c_addrs => [0x28..0x2f], 
    617617       i2c_detect => sub { lm78_detect(0, @_); }, 
    618618       isa_addrs => [0x290], 
    619619       isa_detect => sub { lm78_isa_detect(0, @_); }, 
    620620       alias_detect => sub { lm78_alias_detect(0, @_); }, 
    621      }
     621     }
    622622     { 
    623623       name => "National Semiconductor LM78-J", 
    624624       driver => "lm78", 
    625        i2c_addrs => [0x28..0x2f],  
     625       i2c_addrs => [0x28..0x2f], 
    626626       i2c_detect => sub { lm78_detect(1, @_); }, 
    627627       isa_addrs => [0x290], 
    628628       isa_detect => sub { lm78_isa_detect(1, @_); }, 
    629629       alias_detect => sub { lm78_alias_detect(1, @_); }, 
    630      }
     630     }
    631631     { 
    632632       name => "National Semiconductor LM79", 
    633633       driver => "lm78", 
    634        i2c_addrs => [0x28..0x2f],  
     634       i2c_addrs => [0x28..0x2f], 
    635635       i2c_detect => sub { lm78_detect(2, @_); }, 
    636636       isa_addrs => [0x290], 
    637637       isa_detect => sub { lm78_isa_detect(2, @_); }, 
    638638       alias_detect => sub { lm78_alias_detect(2, @_); }, 
    639      }
     639     }
    640640     { 
    641641       name => "National Semiconductor LM75", 
     
    764764       driver => "w83781d", 
    765765       i2c_detect => sub { w83781d_detect(0, @_); }, 
    766        i2c_addrs => [0x28..0x2f],  
     766       i2c_addrs => [0x28..0x2f], 
    767767       isa_addrs => [0x290], 
    768768       isa_detect => sub { w83781d_isa_detect(0, @_); }, 
    769769       alias_detect => sub { w83781d_alias_detect(0, @_); }, 
    770      }
     770     }
    771771     { 
    772772       name => "Winbond W83782D", 
    773773       driver => "w83781d", 
    774        i2c_addrs => [0x28..0x2f],  
     774       i2c_addrs => [0x28..0x2f], 
    775775       i2c_detect => sub { w83781d_detect(1, @_); }, 
    776776       isa_addrs => [0x290], 
    777777       isa_detect => sub { w83781d_isa_detect(1, @_); }, 
    778778       alias_detect => sub { w83781d_alias_detect(1, @_); }, 
    779      }
     779     }
    780780     { 
    781781       name => "Winbond W83783S", 
     
    783783       i2c_addrs => [0x2d], 
    784784       i2c_detect => sub { w83781d_detect(2, @_); }, 
    785      }
     785     }
    786786     { 
    787787       name => "Winbond W83792D", 
     
    811811       name => "Winbond W83627EHF", 
    812812       driver => "use-isa-instead", 
    813        i2c_addrs => [0x28..0x2f],  
     813       i2c_addrs => [0x28..0x2f], 
    814814       i2c_detect => sub { w83781d_detect(9, @_); }, 
    815815     }, 
     
    817817       name => "Winbond W83627DHG", 
    818818       driver => "use-isa-instead", 
    819        i2c_addrs => [0x28..0x2f],  
     819       i2c_addrs => [0x28..0x2f], 
    820820       i2c_detect => sub { w83781d_detect(10, @_); }, 
    821821     }, 
     
    825825       i2c_addrs => [0x28..0x2f], 
    826826       i2c_detect => sub { w83781d_detect(4, @_); }, 
    827      }
     827     }
    828828     { 
    829829       name => "Asus AS99127F (rev.2)", 
     
    831831       i2c_addrs => [0x28..0x2f], 
    832832       i2c_detect => sub { w83781d_detect(5, @_); }, 
    833      }
     833     }
    834834     { 
    835835       name => "Asus ASB100 Bach", 
     
    837837       i2c_addrs => [0x28..0x2f], 
    838838       i2c_detect => sub { w83781d_detect(6, @_); }, 
    839      }
     839     }
    840840     { 
    841841       name => "Asus ASM58 Mozart-2", 
     
    843843       i2c_addrs => [0x77], 
    844844       i2c_detect => sub { mozart_detect(0, @_); }, 
    845      }
     845     }
    846846     { 
    847847       name => "Asus AS2K129R Mozart-2", 
     
    849849       i2c_addrs => [0x77], 
    850850       i2c_detect => sub { mozart_detect(1, @_); }, 
    851      }
     851     }
    852852     { 
    853853       name => "Asus Mozart-2", 
     
    855855       i2c_addrs => [0x77], 
    856856       i2c_detect => sub { mozart_detect(2, @_); }, 
    857      }
     857     }
    858858     { 
    859859       name => "Winbond W83L784R/AR/G", 
     
    861861       i2c_addrs => [0x2d], 
    862862       i2c_detect => sub { w83l784r_detect(0, @_); }, 
    863      }
     863     }
    864864     { 
    865865       name => "Winbond W83L785R/G", 
     
    867867       i2c_addrs => [0x2d], 
    868868       i2c_detect => sub { w83l784r_detect(1, @_); }, 
    869      }
     869     }
    870870     { 
    871871       name => "Winbond W83L786NR/NG/R/G", 
     
    877877       name => "Winbond W83L785TS-S", 
    878878       driver => "w83l785ts", 
    879        i2c_addrs => [0x2e],  
     879       i2c_addrs => [0x2e], 
    880880       i2c_detect => sub { w83l785ts_detect(0, @_); }, 
    881      }
     881     }
    882882     { 
    883883       name => "Genesys Logic GL518SM Revision 0x00", 
     
    915915       i2c_addrs => [0x48..0x4f], 
    916916       i2c_detect => sub { ds1621_detect(@_); }, 
    917      }
     917     }
    918918     { 
    919919       name => "Dallas Semiconductor DS1780", 
     
    931931       name => "Analog Devices ADM1026", 
    932932       driver => "adm1026", 
    933        i2c_addrs => [0x2c,0x2d,0x2e], 
     933       i2c_addrs => [0x2c, 0x2d, 0x2e], 
    934934       i2c_detect => sub { adm1026_detect(0, @_); }, 
    935935     }, 
     
    949949       name => "Analog Devices ADM1021", 
    950950       driver => "adm1021", 
    951        i2c_addrs => [0x18..0x1a,0x29..0x2b,0x4c..0x4e], 
     951       i2c_addrs => [0x18..0x1a, 0x29..0x2b, 0x4c..0x4e], 
    952952       i2c_detect => sub { adm1021_detect(0, @_); }, 
    953953     }, 
     
    955955       name => "Analog Devices ADM1021A/ADM1023", 
    956956       driver => "adm1021", 
    957        i2c_addrs => [0x18..0x1a,0x29..0x2b,0x4c..0x4e], 
     957       i2c_addrs => [0x18..0x1a, 0x29..0x2b, 0x4c..0x4e], 
    958958       i2c_detect => sub { adm1021_detect(1, @_); }, 
    959959     }, 
     
    961961       name => "Maxim MAX1617", 
    962962       driver => "adm1021", 
    963        i2c_addrs => [0x18..0x1a,0x29..0x2b,0x4c..0x4e], 
     963       i2c_addrs => [0x18..0x1a, 0x29..0x2b, 0x4c..0x4e], 
    964964       i2c_detect => sub { adm1021_detect(2, @_); }, 
    965965     }, 
     
    967967       name => "Maxim MAX1617A", 
    968968       driver => "adm1021", 
    969        i2c_addrs => [0x18..0x1a,0x29..0x2b,0x4c..0x4e], 
     969       i2c_addrs => [0x18..0x1a, 0x29..0x2b, 0x4c..0x4e], 
    970970       i2c_detect => sub { adm1021_detect(3, @_); }, 
    971971     }, 
     
    973973       name => "Maxim MAX1668", 
    974974       driver => "max1668", 
    975        i2c_addrs => [0x18..0x1a,0x29..0x2b,0x4c..0x4e], 
     975       i2c_addrs => [0x18..0x1a, 0x29..0x2b, 0x4c..0x4e], 
    976976       i2c_detect => sub { max1668_detect(0, @_); }, 
    977977     }, 
     
    979979       name => "Maxim MAX1805", 
    980980       driver => "max1668", 
    981        i2c_addrs => [0x18..0x1a,0x29..0x2b,0x4c..0x4e], 
     981       i2c_addrs => [0x18..0x1a, 0x29..0x2b, 0x4c..0x4e], 
    982982       i2c_detect => sub { max1668_detect(1, @_); }, 
    983983     }, 
     
    985985       name => "Maxim MAX1989", 
    986986       driver => "max1668", 
    987        i2c_addrs => [0x18..0x1a,0x29..0x2b,0x4c..0x4e], 
     987       i2c_addrs => [0x18..0x1a, 0x29..0x2b, 0x4c..0x4e], 
    988988       i2c_detect => sub { max1668_detect(2, @_); }, 
    989989     }, 
     
    991991       name => "Maxim MAX6650/MAX6651", 
    992992       driver => "max6650", 
    993        i2c_addrs => [0x1b,0x1f,0x48,0x4b], 
     993       i2c_addrs => [0x1b, 0x1f, 0x48, 0x4b], 
    994994       i2c_detect => sub { max6650_detect(0, @_); }, 
    995995     }, 
     
    10031003       name => "TI THMC10", 
    10041004       driver => "adm1021", 
    1005        i2c_addrs => [0x18..0x1a,0x29..0x2b,0x4c..0x4e], 
     1005       i2c_addrs => [0x18..0x1a, 0x29..0x2b, 0x4c..0x4e], 
    10061006       i2c_detect => sub { adm1021_detect(4, @_); }, 
    10071007     }, 
     
    10091009       name => "National Semiconductor LM84", 
    10101010       driver => "adm1021", 
    1011        i2c_addrs => [0x18..0x1a,0x29..0x2b,0x4c..0x4e], 
     1011       i2c_addrs => [0x18..0x1a, 0x29..0x2b, 0x4c..0x4e], 
    10121012       i2c_detect => sub { adm1021_detect(5, @_); }, 
    10131013     }, 
     
    10151015       name => "Genesys Logic GL523SM", 
    10161016       driver => "adm1021", 
    1017        i2c_addrs => [0x18..0x1a,0x29..0x2b,0x4c..0x4e], 
     1017       i2c_addrs => [0x18..0x1a, 0x29..0x2b, 0x4c..0x4e], 
    10181018       i2c_detect => sub { adm1021_detect(6, @_); }, 
    10191019     }, 
     
    10211021       name => "Onsemi MC1066", 
    10221022       driver => "adm1021", 
    1023        i2c_addrs => [0x18..0x1a,0x29..0x2b,0x4c..0x4e], 
     1023       i2c_addrs => [0x18..0x1a, 0x29..0x2b, 0x4c..0x4e], 
    10241024       i2c_detect => sub { adm1021_detect(7, @_); }, 
    10251025     }, 
     
    10331033       name => "National Semiconductor LM82/LM83", 
    10341034       driver => "lm83", 
    1035        i2c_addrs => [0x18..0x1a,0x29..0x2b,0x4c..0x4e], 
     1035       i2c_addrs => [0x18..0x1a, 0x29..0x2b, 0x4c..0x4e], 
    10361036       i2c_detect => sub { lm83_detect(0, @_); }, 
    10371037     }, 
     
    14211421 
    14221422 
    1423 # This is a list of all recognized superio chips.  
     1423# This is a list of all recognized superio chips. 
    14241424# Each entry must have the following fields: 
    14251425#  name: The full chip name 
     
    17911791    ], 
    17921792    # Non-standard SMSC detection callback and chip list. These chips differ 
    1793     # from the standard ones listed above in that the device ID register  
     1793    # from the standard ones listed above in that the device ID register 
    17941794    # address is 0x0d instead of 0x20 (as specified by the ISA PNP spec). 
    17951795    ns_detect => \&smsc_ns_detect_superio, 
     
    20902090sub parse_not_to_scan 
    20912091{ 
    2092   my ($min,$max,$to_parse) = @_; 
    2093   my @ranges = split /\s*,\s*/, $to_parse; 
     2092  my ($min, $max, $to_parse) = @_; 
     2093  my @ranges = split /\s*, \s*/, $to_parse; 
    20942094  my @res; 
    20952095  my $range; 
     
    21192119sub any_list_match 
    21202120{ 
    2121   my ($list1,$list2) = @_; 
    2122   my ($el1,$el2); 
     2121  my ($list1, $list2) = @_; 
     2122  my ($el1, $el2); 
    21232123  foreach $el1 (@$list1) { 
    21242124    foreach $el2 (@$list2) { 
     
    21502150sub inb 
    21512151{ 
    2152   my ($res,$nrchars); 
     2152  my ($res, $nrchars); 
    21532153  sysseek IOPORTS, $_[0], 0 or return -1; 
    21542154  $nrchars = sysread IOPORTS, $res, 1; 
    21552155  return -1 if not defined $nrchars or $nrchars != 1; 
    2156   $res = unpack "C",$res
     2156  $res = unpack "C", $res
    21572157  return $res; 
    21582158} 
     
    21762176sub isa_read_byte 
    21772177{ 
    2178   outb $_[0],$_[2]; 
     2178  outb $_[0], $_[2]; 
    21792179  return inb $_[1]; 
    21802180} 
     
    21872187sub isa_write_byte 
    21882188{ 
    2189   outb $_[0],$_[2]; 
    2190   outb $_[1],$_[3]; 
     2189  outb $_[0], $_[2]; 
     2190  outb $_[1], $_[3]; 
    21912191} 
    21922192 
     
    22262226    close INPUTFILE; 
    22272227  } 
    2228    
     2228 
    22292229  if (!$use_udev) { 
    22302230    # Try some known default udev db locations, just in case 
     
    22762276  my ($vers, $plvl, $slvl) = @_; 
    22772277  return 1 if ($kernel_version[0]  > $vers || 
    2278                 ($kernel_version[0] == $vers &&  
    2279                   ($kernel_version[1]  > $plvl ||  
    2280                     ($kernel_version[1] == $plvl &&  
     2278                ($kernel_version[0] == $vers && 
     2279                  ($kernel_version[1]  > $plvl || 
     2280                    ($kernel_version[1] == $plvl && 
    22812281                      ($kernel_version[2] >= $slvl))))); 
    22822282  return 0; 
     
    23842384{ 
    23852385  my $device = shift; 
    2386    
     2386 
    23872387  my $link = readlink("$device/driver"); 
    23882388  return unless defined $link; 
     
    24632463    $record{vendid} = $vend >> 16; 
    24642464    $record{devid} = $vend & 0xffff; 
    2465      
     2465 
    24662466    push @pci_list, \%record; 
    24672467  } 
     
    24962496 
    24972497  # first, determine which driver if any... 
    2498   if (kernel_version_at_least(2,6,0)) { 
     2498  if (kernel_version_at_least(2, 6, 0)) { 
    24992499    if (exists $pci_list{"1039:0016"}) { 
    25002500      $driver = "i2c-sis96x"; 
     
    25022502      $driver = "i2c-sis5595"; 
    25032503    } 
    2504   } elsif (kernel_version_at_least(2,4,0)) { 
     2504  } elsif (kernel_version_at_least(2, 4, 0)) { 
    25052505    if (exists $pci_list{"1039:0008"}) { 
    25062506      if ((exists $pci_list{"1039:0645"}) || 
     
    25972597           $device->{vendid}, $device->{devid}, pci_busid($device); 
    25982598  } 
    2599    
     2599 
    26002600  if (! @res) { 
    26012601    print "Sorry, no supported PCI bus adapters found.\n"; 
     
    26582658sub i2c_set_slave_addr 
    26592659{ 
    2660   my ($file,$addr) = @_; 
     2660  my ($file, $addr) = @_; 
    26612661  $addr += 0; # Make sure it's a number not a string 
    26622662  ioctl $file, IOCTL_I2C_SLAVE, $addr or return 0; 
     
    26642664} 
    26652665 
    2666 # i2c_smbus_access is based upon the corresponding C function (see  
     2666# i2c_smbus_access is based upon the corresponding C function (see 
    26672667# <linux/i2c-dev.h>). You should not need to call this directly. 
    26682668# Exact calling conventions are intricate; read i2c-dev.c if you really need 
     
    26752675# Returns: 0 on failure, 1 on success. 
    26762676# Note that we need to get back to Integer boundaries through the 'x2' 
    2677 # in the pack. This is very compiler-dependent; I wish there was some other  
     2677# in the pack. This is very compiler-dependent; I wish there was some other 
    26782678# way to do this. 
    26792679sub i2c_smbus_access 
    26802680{ 
    2681   my ($file,$read_write,$command,$size,$data) = @_; 
     2681  my ($file, $read_write, $command, $size, $data) = @_; 
    26822682  my $data_array = pack "C32", @$data; 
    2683   my $ioctl_data = pack "C2x2Ip", ($read_write,$command,$size,$data_array); 
     2683  my $ioctl_data = pack "C2x2Ip", ($read_write, $command, $size, $data_array); 
    26842684  ioctl $file, IOCTL_I2C_SMBUS, $ioctl_data or return 0; 
    2685   @{$_[4]} = unpack "C32",$data_array; 
     2685  @{$_[4]} = unpack "C32", $data_array; 
    26862686  return 1; 
    26872687} 
     
    26922692sub i2c_smbus_write_quick 
    26932693{ 
    2694   my ($file,$value) = @_; 
     2694  my ($file, $value) = @_; 
    26952695  my @data; 
    26962696  i2c_smbus_access $file, $value, 0, SMBUS_QUICK, \@data 
     
    27152715sub i2c_smbus_read_byte_data 
    27162716{ 
    2717   my ($file,$command) = @_; 
     2717  my ($file, $command) = @_; 
    27182718  my @data; 
    27192719  i2c_smbus_access $file, SMBUS_READ, $command, SMBUS_BYTE_DATA, \@data 
     
    27212721  return $data[0]; 
    27222722} 
    2723    
     2723 
    27242724# $_[0]: Reference to an opened filehandle 
    27252725# $_[1]: Command byte (usually register number) 
     
    27292729# and only start using word reads when there is a good chance that 
    27302730# the detection will succeed. 
    2731 # Note: some devices use the wrong endiannes; use swap_bytes to correct for  
     2731# Note: some devices use the wrong endiannes; use swap_bytes to correct for 
    27322732# this. 
    27332733sub i2c_smbus_read_word_data 
    27342734{ 
    2735   my ($file,$command) = @_; 
     2735  my ($file, $command) = @_; 
    27362736  my @data; 
    27372737  i2c_smbus_access $file, SMBUS_READ, $command, SMBUS_WORD_DATA, \@data 
     
    28322832#  with field 'i2c_sub_addrs', containing a reference to a list of 
    28332833#       other I2C addresses (if this is an I2C detection) 
    2834 #  with field 'isa_addr' containing the ISA address this chip is on  
     2834#  with field 'isa_addr' containing the ISA address this chip is on 
    28352835#       (if this is an ISA detection) 
    28362836#  with field 'conf', containing the confidence level of this detection 
     
    28462846sub add_i2c_to_chips_detected 
    28472847{ 
    2848   my ($chipdriver,$datahash) = @_; 
    2849   my ($i,$new_detected_ref,$new_misdetected_ref,$detected_ref,$misdetected_ref, 
    2850       $main_entry,$detected_entry,$put_in_detected,@hash_addrs,@entry_addrs, 
     2848  my ($chipdriver, $datahash) = @_; 
     2849  my ($i, $new_detected_ref, $new_misdetected_ref, $detected_ref, $misdetected_ref, 
     2850      $main_entry, $detected_entry, $put_in_detected, @hash_addrs, @entry_addrs, 
    28512851      $do_not_add); 
    28522852 
     
    29002900    # be told to ignore valid addresses). 
    29012901    @hash_addrs = ($datahash->{i2c_addr}); 
    2902     push @hash_addrs, @{$datahash->{i2c_sub_addrs}}  
     2902    push @hash_addrs, @{$datahash->{i2c_sub_addrs}} 
    29032903         if exists $datahash->{i2c_sub_addrs}; 
    29042904    foreach $main_entry (@chips_detected) { 
     
    29112911        if ($detected_ref->[$i]->{i2c_devnr} == $datahash->{i2c_devnr} and 
    29122912            any_list_match \@entry_addrs, \@hash_addrs) { 
    2913           push @$misdetected_ref,$detected_ref->[$i] 
     2913          push @$misdetected_ref, $detected_ref->[$i] 
    29142914            unless $chipdriver eq $main_entry->{driver}; 
    29152915          splice @$detected_ref, $i, 1; 
     
    29212921    push @$new_detected_ref, $datahash; 
    29222922  } else { 
    2923     # No hard work here  
     2923    # No hard work here 
    29242924    push @$new_misdetected_ref, $datahash 
    29252925      unless $do_not_add; 
     
    29352935sub add_isa_to_chips_detected 
    29362936{ 
    2937   my ($alias_detect,$chipdriver,$datahash) = @_; 
    2938   my ($i,$new_detected_ref,$new_misdetected_ref,$detected_ref,$misdetected_ref, 
    2939       $main_entry,$isalias); 
     2937  my ($alias_detect, $chipdriver, $datahash) = @_; 
     2938  my ($i, $new_detected_ref, $new_misdetected_ref, $detected_ref, $misdetected_ref, 
     2939      $main_entry, $isalias); 
    29402940 
    29412941  # First determine where the hash has to be added. 
     
    29682968        next; 
    29692969      binmode FILE; 
    2970       i2c_set_slave_addr \*FILE,$new_misdetected_ref->[$i]->{i2c_addr} or 
     2970      i2c_set_slave_addr \*FILE, $new_misdetected_ref->[$i]->{i2c_addr} or 
    29712971           print("Can't set I2C address for ", 
    29722972                 "$dev_i2c$new_misdetected_ref->[$i]->{i2c_devnr}?!?\n"), 
    29732973           next; 
    2974       if (&$alias_detect ($datahash->{isa_addr},\*FILE, 
     2974      if (&$alias_detect ($datahash->{isa_addr}, \*FILE, 
    29752975                          $new_misdetected_ref->[$i]->{i2c_addr})) { 
    29762976        $new_misdetected_ref->[$i]->{isa_addr} = $datahash->{isa_addr}; 
    2977         return $new_misdetected_ref->[$i];  
     2977        return $new_misdetected_ref->[$i]; 
    29782978      } 
    29792979    } 
     
    29902990        next; 
    29912991      binmode FILE; 
    2992       i2c_set_slave_addr \*FILE,$new_detected_ref->[$i]->{i2c_addr} or 
     2992      i2c_set_slave_addr \*FILE, $new_detected_ref->[$i]->{i2c_addr} or 
    29932993           print("Can't set I2C address for ", 
    29942994                 "$dev_i2c$new_detected_ref->[$i]->{i2c_devnr}?!?\n"), 
    29952995           next; 
    2996       if (&$alias_detect ($datahash->{isa_addr},\*FILE, 
     2996      if (&$alias_detect ($datahash->{isa_addr}, \*FILE, 
    29972997                          $new_detected_ref->[$i]->{i2c_addr})) { 
    29982998        $new_detected_ref->[$i]->{isa_addr} = $datahash->{isa_addr}; 
     
    30203020            unless $main_entry->{driver} eq $chipdriver; 
    30213021        } else { 
    3022