Changeset 5260

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

Mass coding-style cleanups.

Files:

Legend:

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

    r5258 r5260  
    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, 
     
    195195       match => qr/^SMBus SCH adapter at [0-9a-f]{4}/, 
    196196     }, 
    197      {  
     197     { 
    198198       vendid => 0x1106, 
    199199       devid  => 0x3040, 
     
    201201       driver => "i2c-via", 
    202202       match => qr/^VIA i2c/, 
    203      }
    204      {  
     203     }
     204     { 
    205205       vendid => 0x1106, 
    206206       devid  => 0x3050, 
     
    208208       driver => "i2c-viapro", 
    209209       match => qr/^SMBus V(IA|ia) Pro adapter at/, 
    210      }
    211      {  
     210     }
     211     { 
    212212       vendid => 0x1106, 
    213213       devid  => 0x3051, 
     
    215215       driver => "i2c-viapro", 
    216216       match => qr/^SMBus V(IA|ia) Pro adapter at/, 
    217      }
    218      {  
     217     }
     218     { 
    219219       vendid => 0x1106, 
    220220       devid  => 0x3057, 
     
    222222       driver => "i2c-viapro", 
    223223       match => qr/^SMBus V(IA|ia) Pro adapter at/, 
    224      }
    225      {  
     224     }
     225     { 
    226226       vendid => 0x1106, 
    227227       devid  => 0x3074, 
     
    229229       driver => "i2c-viapro", 
    230230       match => qr/^SMBus V(IA|ia) Pro adapter at/, 
    231      }
    232      {  
     231     }
     232     { 
    233233       vendid => 0x1106, 
    234234       devid  => 0x3147, 
     
    236236       driver => "i2c-viapro", 
    237237       match => qr/^SMBus V(IA|ia) Pro adapter at/, 
    238      }
    239      {  
     238     }
     239     { 
    240240       vendid => 0x1106, 
    241241       devid  => 0x3177, 
     
    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      }
     252     }
    253253     { 
    254254       vendid => 0x1106, 
     
    257257       driver => "i2c-viapro", 
    258258       match => qr/^SMBus V(IA|ia) Pro adapter at/, 
    259      }
    260      {  
     259     }
     260     { 
    261261       vendid => 0x1106, 
    262262       devid  => 0x8235, 
     
    264264       driver => "i2c-viapro", 
    265265       match => qr/^SMBus V(IA|ia) Pro adapter at/, 
    266      }
    267      {  
     266     }
     267     { 
    268268       vendid => 0x1106, 
    269269       devid  => 0x3287, 
     
    271271       driver => "i2c-viapro", 
    272272       match => qr/^SMBus V(IA|ia) Pro adapter at/, 
    273      }
     273     }
    274274     { 
    275275       vendid => 0x1106, 
     
    284284       procid => "Silicon Integrated Systems SIS5581/5582/5597/5598 (To be written - Do not use 5595 drivers)", 
    285285       driver => "to-be-written", 
    286      }
     286     }
    287287     { 
    288288       vendid => 0x1039, 
     
    290290       procid => "Silicon Integrated Systems SIS5598 (To be written - Do not use 5595 drivers)", 
    291291       driver => "to-be-written", 
    292      }
     292     }
    293293     { 
    294294       vendid => 0x1039, 
     
    296296       procid => "Silicon Integrated Systems SIS540 (To be written - Do not use 5595 drivers)", 
    297297       driver => "to-be-written", 
    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       vendid => 0x1039, 
     
    310310       driver => "i2c-sis630", 
    311311       match => qr/^SMBus SIS630 adapter at [0-9a-f]{4}/, 
    312      }
     312     }
    313313# 
    314314# Both Ali chips below have same PCI ID. Can't be helped. Only one should load. 
     
    335335       match => qr/^SMBus ALi 1563 Adapter @/, 
    336336     }, 
    337      {  
     337     { 
    338338       vendid => 0x1022, 
    339339       devid  => 0x740b, 
     
    342342       match => qr/^SMBus AMD756 adapter at [0-9a-f]{4}/, 
    343343     }, 
    344      {  
     344     { 
    345345       vendid => 0x1022, 
    346346       devid  => 0x7413, 
     
    349349       match => qr/^SMBus AMD766 adapter at [0-9a-f]{4}/, 
    350350     }, 
    351      {  
     351     { 
    352352       vendid => 0x1022, 
    353353       devid  => 0x7443, 
     
    356356       match => qr/^SMBus AMD768 adapter at [0-9a-f]{4}/, 
    357357     }, 
    358      {  
     358     { 
    359359       vendid => 0x1022, 
    360360       devid  => 0x746b, 
     
    363363       match => qr/^SMBus AMD8111 adapter at [0-9a-f]{4}/, 
    364364     }, 
    365      {  
     365     { 
    366366       vendid => 0x1022, 
    367367       devid  => 0x746a, 
     
    376376       driver => "i2c-amd756", 
    377377       match => qr/^SMBus nVidia nForce adapter at [0-9a-f]{4}/, 
    378      } ,  
    379      {  
     378     }, 
     379     { 
    380380       vendid => 0x10de, 
    381381       devid  => 0x0064, 
     
    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, 
     
    411411       driver => "i2c-nforce2", 
    412412       match => qr/^SMBus nForce2 adapter at /, 
    413      },  
     413     }, 
    414414     { 
    415415       vendid => 0x10de, 
     
    453453       driver => "i2c-piix4", 
    454454       match => qr/^SMBus PIIX4 adapter at /, 
    455      } ,  
    456      {  
     455     }, 
     456     { 
    457457       vendid => 0x1055, 
    458458       devid  => 0x9463, 
     
    460460       driver => "i2c-piix4", 
    461461       match => qr/^SMBus PIIX4 adapter at /, 
    462      } ,  
    463      {  
     462     }, 
     463     { 
    464464       vendid => 0x1166, 
    465465       devid  => 0x0201, 
     
    467467       driver => "i2c-piix4", 
    468468       match => qr/^SMBus PIIX4 adapter at /, 
    469      } ,  
    470      {  
     469     }, 
     470     { 
    471471       vendid => 0x1166, 
    472472       devid  => 0x0203, 
     
    474474       driver => "i2c-piix4", 
    475475       match => qr/^SMBus PIIX4 adapter at /, 
    476      } ,  
     476     }, 
    477477     { 
    478478       vendid => 0x1166, 
     
    482482       match => qr/^SMBus PIIX4 adapter at /, 
    483483     }, 
    484      {  
     484     { 
    485485       vendid => 0x1002, 
    486486       devid  => 0x4353, 
     
    488488       driver => "i2c-piix4", 
    489489       match => qr/^SMBus PIIX4 adapter at /, 
    490      } ,  
    491      {  
     490     }, 
     491     { 
    492492       vendid => 0x1002, 
    493493       devid  => 0x4363, 
     
    495495       driver => "i2c-piix4", 
    496496       match => qr/^SMBus PIIX4 adapter at /, 
    497      } ,  
    498      {  
     497     }, 
     498     { 
    499499       vendid => 0x1002, 
    500500       devid  => 0x4372, 
     
    502502       driver => "i2c-piix4", 
    503503       match => qr/^SMBus PIIX4 adapter at /, 
    504      } ,  
    505      {  
     504     }, 
     505     { 
    506506       vendid => 0x1002, 
    507507       devid  => 0x4385, 
     
    509509       driver => "i2c-piix4", 
    510510       match => qr/^SMBus PIIX4 adapter at /, 
    511      } ,  
     511     }, 
    512512     { 
    513513       vendid => 0x100B, 
     
    553553       driver => "i2c-sis5595", 
    554554       match => qr/^SMBus SIS5595 adapter at [0-9a-f]{4}/, 
    555      }
     555     }
    556556); 
    557557 
     
    563563       driver => "i2c-sis645", 
    564564       match => qr/^SiS645 SMBus adapter at [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       vendid => 0x1039, 
     
    577577       driver => "i2c-sis645", 
    578578       match => qr/^SiS645 SMBus adapter at 0x[0-9a-f]{4}/, 
    579      }
     579     }
    580580); 
    581581 
     
    587587       driver => "i2c-sis96x", 
    588588       match => qr/^SiS96x SMBus adapter at 0x[0-9a-f]{4}/, 
    589      }
     589     }
    590590); 
    591591 
    592 # This is a list of all recognized chips.  
     592# This is a list of all recognized chips. 
    593593# Each entry must have the following fields: 
    594594#  name: The full chip name 
     
    615615       name => "Myson MTP008", 
    616616       driver => "mtp008", 
    617        i2c_addrs => [0x2c..0x2e],  
     617       i2c_addrs => [0x2c..0x2e], 
    618618       i2c_detect => sub { mtp008_detect(@_); }, 
    619      }
     619     }
    620620     { 
    621621       name => "National Semiconductor LM78", 
    622622       driver => "lm78", 
    623        i2c_addrs => [0x28..0x2f],  
     623       i2c_addrs => [0x28..0x2f], 
    624624       i2c_detect => sub { lm78_detect(0, @_); }, 
    625625       isa_addrs => [0x290], 
    626626       isa_detect => sub { lm78_isa_detect(0, @_); }, 
    627627       alias_detect => sub { lm78_alias_detect(0, @_); }, 
    628      }
     628     }
    629629     { 
    630630       name => "National Semiconductor LM78-J", 
    631631       driver => "lm78", 
    632        i2c_addrs => [0x28..0x2f],  
     632       i2c_addrs => [0x28..0x2f], 
    633633       i2c_detect => sub { lm78_detect(1, @_); }, 
    634634       isa_addrs => [0x290], 
    635635       isa_detect => sub { lm78_isa_detect(1, @_); }, 
    636636       alias_detect => sub { lm78_alias_detect(1, @_); }, 
    637      }
     637     }
    638638     { 
    639639       name => "National Semiconductor LM79", 
    640640       driver => "lm78", 
    641        i2c_addrs => [0x28..0x2f],  
     641       i2c_addrs => [0x28..0x2f], 
    642642       i2c_detect => sub { lm78_detect(2, @_); }, 
    643643       isa_addrs => [0x290], 
    644644       isa_detect => sub { lm78_isa_detect(2, @_); }, 
    645645       alias_detect => sub { lm78_alias_detect(2, @_); }, 
    646      }
     646     }
    647647     { 
    648648       name => "National Semiconductor LM75", 
     
    771771       driver => "w83781d", 
    772772       i2c_detect => sub { w83781d_detect(0, @_); }, 
    773        i2c_addrs => [0x28..0x2f],  
     773       i2c_addrs => [0x28..0x2f], 
    774774       isa_addrs => [0x290], 
    775775       isa_detect => sub { w83781d_isa_detect(0, @_); }, 
    776776       alias_detect => sub { w83781d_alias_detect(0, @_); }, 
    777      }
     777     }
    778778     { 
    779779       name => "Winbond W83782D", 
    780780       driver => "w83781d", 
    781        i2c_addrs => [0x28..0x2f],  
     781       i2c_addrs => [0x28..0x2f], 
    782782       i2c_detect => sub { w83781d_detect(1, @_); }, 
    783783       isa_addrs => [0x290], 
    784784       isa_detect => sub { w83781d_isa_detect(1, @_); }, 
    785785       alias_detect => sub { w83781d_alias_detect(1, @_); }, 
    786      }
     786     }
    787787     { 
    788788       name => "Winbond W83783S", 
     
    790790       i2c_addrs => [0x2d], 
    791791       i2c_detect => sub { w83781d_detect(2, @_); }, 
    792      }
     792     }
    793793     { 
    794794       name => "Winbond W83792D", 
     
    818818       name => "Winbond W83627EHF", 
    819819       driver => "use-isa-instead", 
    820        i2c_addrs => [0x28..0x2f],  
     820       i2c_addrs => [0x28..0x2f], 
    821821       i2c_detect => sub { w83781d_detect(9, @_); }, 
    822822     }, 
     
    824824       name => "Winbond W83627DHG", 
    825825       driver => "use-isa-instead", 
    826        i2c_addrs => [0x28..0x2f],  
     826       i2c_addrs => [0x28..0x2f], 
    827827       i2c_detect => sub { w83781d_detect(10, @_); }, 
    828828     }, 
     
    832832       i2c_addrs => [0x28..0x2f], 
    833833       i2c_detect => sub { w83781d_detect(4, @_); }, 
    834      }
     834     }
    835835     { 
    836836       name => "Asus AS99127F (rev.2)", 
     
    838838       i2c_addrs => [0x28..0x2f], 
    839839       i2c_detect => sub { w83781d_detect(5, @_); }, 
    840      }
     840     }
    841841     { 
    842842       name => "Asus ASB100 Bach", 
     
    844844       i2c_addrs => [0x28..0x2f], 
    845845       i2c_detect => sub { w83781d_detect(6, @_); }, 
    846      }
     846     }
    847847     { 
    848848       name => "Asus ASM58 Mozart-2", 
     
    850850       i2c_addrs => [0x77], 
    851851       i2c_detect => sub { mozart_detect(0, @_); }, 
    852      }
     852     }
    853853     { 
    854854       name => "Asus AS2K129R Mozart-2", 
     
    856856       i2c_addrs => [0x77], 
    857857       i2c_detect => sub { mozart_detect(1, @_); }, 
    858      }
     858     }
    859859     { 
    860860       name => "Asus Mozart-2", 
     
    862862       i2c_addrs => [0x77], 
    863863       i2c_detect => sub { mozart_detect(2, @_); }, 
    864      }
     864     }
    865865     { 
    866866       name => "Winbond W83L784R/AR/G", 
     
    868868       i2c_addrs => [0x2d], 
    869869       i2c_detect => sub { w83l784r_detect(0, @_); }, 
    870      }
     870     }
    871871     { 
    872872       name => "Winbond W83L785R/G", 
     
    874874       i2c_addrs => [0x2d], 
    875875       i2c_detect => sub { w83l784r_detect(1, @_); }, 
    876      }
     876     }
    877877     { 
    878878       name => "Winbond W83L786NR/NG/R/G", 
     
    884884       name => "Winbond W83L785TS-S", 
    885885       driver => "w83l785ts", 
    886        i2c_addrs => [0x2e],  
     886       i2c_addrs => [0x2e], 
    887887       i2c_detect => sub { w83l785ts_detect(0, @_); }, 
    888      }
     888     }
    889889     { 
    890890       name => "Genesys Logic GL518SM Revision 0x00", 
     
    922922       i2c_addrs => [0x48..0x4f], 
    923923       i2c_detect => sub { ds1621_detect(@_); }, 
    924      }
     924     }
    925925     { 
    926926       name => "Dallas Semiconductor DS1780", 
     
    938938       name => "Analog Devices ADM1026", 
    939939       driver => "adm1026", 
    940        i2c_addrs => [0x2c,0x2d,0x2e], 
     940       i2c_addrs => [0x2c, 0x2d, 0x2e], 
    941941       i2c_detect => sub { adm1026_detect(0, @_); }, 
    942942     }, 
     
    956956       name => "Analog Devices ADM1021", 
    957957       driver => "adm1021", 
    958        i2c_addrs => [0x18..0x1a,0x29..0x2b,0x4c..0x4e], 
     958       i2c_addrs => [0x18..0x1a, 0x29..0x2b, 0x4c..0x4e], 
    959959       i2c_detect => sub { adm1021_detect(0, @_); }, 
    960960     }, 
     
    962962       name => "Analog Devices ADM1021A/ADM1023", 
    963963       driver => "adm1021", 
    964        i2c_addrs => [0x18..0x1a,0x29..0x2b,0x4c..0x4e], 
     964       i2c_addrs => [0x18..0x1a, 0x29..0x2b, 0x4c..0x4e], 
    965965       i2c_detect => sub { adm1021_detect(1, @_); }, 
    966966     }, 
     
    968968       name => "Maxim MAX1617", 
    969969       driver => "adm1021", 
    970        i2c_addrs => [0x18..0x1a,0x29..0x2b,0x4c..0x4e], 
     970       i2c_addrs => [0x18..0x1a, 0x29..0x2b, 0x4c..0x4e], 
    971971       i2c_detect => sub { adm1021_detect(2, @_); }, 
    972972     }, 
     
    974974       name => "Maxim MAX1617A", 
    975975       driver => "adm1021", 
    976        i2c_addrs => [0x18..0x1a,0x29..0x2b,0x4c..0x4e], 
     976       i2c_addrs => [0x18..0x1a, 0x29..0x2b, 0x4c..0x4e], 
    977977       i2c_detect => sub { adm1021_detect(3, @_); }, 
    978978     }, 
     
    980980       name => "Maxim MAX1668", 
    981981       driver => "max1668", 
    982        i2c_addrs => [0x18..0x1a,0x29..0x2b,0x4c..0x4e], 
     982       i2c_addrs => [0x18..0x1a, 0x29..0x2b, 0x4c..0x4e], 
    983983       i2c_detect => sub { max1668_detect(0, @_); }, 
    984984     }, 
     
    986986       name => "Maxim MAX1805", 
    987987       driver => "max1668", 
    988        i2c_addrs => [0x18..0x1a,0x29..0x2b,0x4c..0x4e], 
     988       i2c_addrs => [0x18..0x1a, 0x29..0x2b, 0x4c..0x4e], 
    989989       i2c_detect => sub { max1668_detect(1, @_); }, 
    990990     }, 
     
    992992       name => "Maxim MAX1989", 
    993993       driver => "max1668", 
    994        i2c_addrs => [0x18..0x1a,0x29..0x2b,0x4c..0x4e], 
     994       i2c_addrs => [0x18..0x1a, 0x29..0x2b, 0x4c..0x4e], 
    995995       i2c_detect => sub { max1668_detect(2, @_); }, 
    996996     }, 
     
    998998       name => "Maxim MAX6650/MAX6651", 
    999999       driver => "max6650", 
    1000        i2c_addrs => [0x1b,0x1f,0x48,0x4b], 
     1000       i2c_addrs => [0x1b, 0x1f, 0x48, 0x4b], 
    10011001       i2c_detect => sub { max6650_detect(0, @_); }, 
    10021002     }, 
     
    10101010       name => "TI THMC10", 
    10111011       driver => "adm1021", 
    1012        i2c_addrs => [0x18..0x1a,0x29..0x2b,0x4c..0x4e], 
     1012       i2c_addrs => [0x18..0x1a, 0x29..0x2b, 0x4c..0x4e], 
    10131013       i2c_detect => sub { adm1021_detect(4, @_); }, 
    10141014     }, 
     
    10161016       name => "National Semiconductor LM84", 
    10171017       driver => "adm1021", 
    1018        i2c_addrs => [0x18..0x1a,0x29..0x2b,0x4c..0x4e], 
     1018       i2c_addrs => [0x18..0x1a, 0x29..0x2b, 0x4c..0x4e], 
    10191019       i2c_detect => sub { adm1021_detect(5, @_); }, 
    10201020     }, 
     
    10221022       name => "Genesys Logic GL523SM", 
    10231023       driver => "adm1021", 
    1024        i2c_addrs => [0x18..0x1a,0x29..0x2b,0x4c..0x4e], 
     1024       i2c_addrs => [0x18..0x1a, 0x29..0x2b, 0x4c..0x4e], 
    10251025       i2c_detect => sub { adm1021_detect(6, @_); }, 
    10261026     }, 
     
    10281028       name => "Onsemi MC1066", 
    10291029       driver => "adm1021", 
    1030        i2c_addrs => [0x18..0x1a,0x29..0x2b,0x4c..0x4e], 
     1030       i2c_addrs => [0x18..0x1a, 0x29..0x2b, 0x4c..0x4e], 
    10311031       i2c_detect => sub { adm1021_detect(7, @_); }, 
    10321032     }, 
     
    10401040       name => "National Semiconductor LM82/LM83", 
    10411041       driver => "lm83", 
    1042        i2c_addrs => [0x18..0x1a,0x29..0x2b,0x4c..0x4e], 
     1042       i2c_addrs => [0x18..0x1a, 0x29..0x2b, 0x4c..0x4e], 
    10431043       i2c_detect => sub { lm83_detect(0, @_); }, 
    10441044     }, 
     
    14281428 
    14291429 
    1430 # This is a list of all recognized superio chips.  
     1430# This is a list of all recognized superio chips. 
    14311431# Each entry must have the following fields: 
    14321432#  name: The full chip name 
     
    17981798    ], 
    17991799    # Non-standard SMSC detection callback and chip list. These chips differ 
    1800     # from the standard ones listed above in that the device ID register  
     1800    # from the standard ones listed above in that the device ID register 
    18011801    # address is 0x0d instead of 0x20 (as specified by the ISA PNP spec). 
    18021802    ns_detect => \&smsc_ns_detect_superio, 
     
    20972097sub parse_not_to_scan 
    20982098{ 
    2099   my ($min,$max,$to_parse) = @_; 
    2100   my @ranges = split /\s*,\s*/, $to_parse; 
     2099  my ($min, $max, $to_parse) = @_; 
     2100  my @ranges = split /\s*, \s*/, $to_parse; 
    21012101  my @res; 
    21022102  my $range; 
     
    21262126sub any_list_match 
    21272127{ 
    2128   my ($list1,$list2) = @_; 
    2129   my ($el1,$el2); 
     2128  my ($list1, $list2) = @_; 
     2129  my ($el1, $el2); 
    21302130  foreach $el1 (@$list1) { 
    21312131    foreach $el2 (@$list2) { 
     
    21572157sub inb 
    21582158{ 
    2159   my ($res,$nrchars); 
     2159  my ($res, $nrchars); 
    21602160  sysseek IOPORTS, $_[0], 0 or return -1; 
    21612161  $nrchars = sysread IOPORTS, $res, 1; 
    21622162  return -1 if not defined $nrchars or $nrchars != 1; 
    2163   $res = unpack "C",$res
     2163  $res = unpack "C", $res
    21642164  return $res; 
    21652165} 
     
    21832183sub isa_read_byte 
    21842184{ 
    2185   outb $_[0],$_[2]; 
     2185  outb $_[0], $_[2]; 
    21862186  return inb $_[1]; 
    21872187} 
     
    21942194sub isa_write_byte 
    21952195{ 
    2196   outb $_[0],$_[2]; 
    2197   outb $_[1],$_[3]; 
     2196  outb $_[0], $_[2]; 
     2197  outb $_[1], $_[3]; 
    21982198} 
    21992199 
     
    22332233    close INPUTFILE; 
    22342234  } 
    2235    
     2235 
    22362236  if (!$use_udev) { 
    22372237    # Try some known default udev db locations, just in case 
     
    22832283  my ($vers, $plvl, $slvl) = @_; 
    22842284  return 1 if ($kernel_version[0]  > $vers || 
    2285                 ($kernel_version[0] == $vers &&  
    2286                   ($kernel_version[1]  > $plvl ||  
    2287                     ($kernel_version[1] == $plvl &&  
     2285                ($kernel_version[0] == $vers && 
     2286                  ($kernel_version[1]  > $plvl || 
     2287                    ($kernel_version[1] == $plvl && 
    22882288                      ($kernel_version[2] >= $slvl))))); 
    22892289  return 0; 
     
    23912391{ 
    23922392  my $device = shift; 
    2393    
     2393 
    23942394  my $link = readlink("$device/driver"); 
    23952395  return unless defined $link; 
     
    24702470    $record{vendid} = $vend >> 16; 
    24712471    $record{devid} = $vend & 0xffff; 
    2472      
     2472 
    24732473    push @pci_list, \%record; 
    24742474  } 
     
    25032503 
    25042504  # first, determine which driver if any... 
    2505   if (kernel_version_at_least(2,6,0)) { 
     2505  if (kernel_version_at_least(2, 6, 0)) { 
    25062506    if (exists $pci_list{"1039:0016"}) { 
    25072507      $driver = "i2c-sis96x"; 
     
    25092509      $driver = "i2c-sis5595"; 
    25102510    } 
    2511   } elsif (kernel_version_at_least(2,4,0)) { 
     2511  } elsif (kernel_version_at_least(2, 4, 0)) { 
    25122512    if (exists $pci_list{"1039:0008"}) { 
    25132513      if ((exists $pci_list{"1039:0645"}) || 
     
    26042604           $device->{vendid}, $device->{devid}, pci_busid($device); 
    26052605  } 
    2606    
     2606 
    26072607  if (! @res) { 
    26082608    print "Sorry, no supported PCI bus adapters found.\n"; 
     
    26652665sub i2c_set_slave_addr 
    26662666{ 
    2667   my ($file,$addr) = @_; 
     2667  my ($file, $addr) = @_; 
    26682668  $addr += 0; # Make sure it's a number not a string 
    26692669  ioctl $file, IOCTL_I2C_SLAVE, $addr or return 0; 
     
    26712671} 
    26722672 
    2673 # i2c_smbus_access is based upon the corresponding C function (see  
     2673# i2c_smbus_access is based upon the corresponding C function (see 
    26742674# <linux/i2c-dev.h>). You should not need to call this directly. 
    26752675# Exact calling conventions are intricate; read i2c-dev.c if you really need 
     
    26822682# Returns: 0 on failure, 1 on success. 
    26832683# Note that we need to get back to Integer boundaries through the 'x2' 
    2684 # in the pack. This is very compiler-dependent; I wish there was some other  
     2684# in the pack. This is very compiler-dependent; I wish there was some other 
    26852685# way to do this. 
    26862686sub i2c_smbus_access 
    26872687{ 
    2688   my ($file,$read_write,$command,$size,$data) = @_; 
     2688  my ($file, $read_write, $command, $size, $data) = @_; 
    26892689  my $data_array = pack "C32", @$data; 
    2690   my $ioctl_data = pack "C2x2Ip", ($read_write,$command,$size,$data_array); 
     2690  my $ioctl_data = pack "C2x2Ip", ($read_write, $command, $size, $data_array); 
    26912691  ioctl $file, IOCTL_I2C_SMBUS, $ioctl_data or return 0; 
    2692   @{$_[4]} = unpack "C32",$data_array; 
     2692  @{$_[4]} = unpack "C32", $data_array; 
    26932693  return 1; 
    26942694} 
     
    26992699sub i2c_smbus_write_quick 
    27002700{ 
    2701   my ($file,$value) = @_; 
     2701  my ($file, $value) = @_; 
    27022702  my @data; 
    27032703  i2c_smbus_access $file, $value, 0, SMBUS_QUICK, \@data 
     
    27222722sub i2c_smbus_read_byte_data 
    27232723{ 
    2724   my ($file,$command) = @_; 
     2724  my ($file, $command) = @_; 
    27252725  my @data; 
    27262726  i2c_smbus_access $file, SMBUS_READ, $command, SMBUS_BYTE_DATA, \@data 
     
    27282728  return $data[0]; 
    27292729} 
    2730    
     2730 
    27312731# $_[0]: Reference to an opened filehandle 
    27322732# $_[1]: Command byte (usually register number) 
     
    27362736# and only start using word reads when there is a good chance that 
    27372737# the detection will succeed. 
    2738 # Note: some devices use the wrong endiannes; use swap_bytes to correct for  
     2738# Note: some devices use the wrong endiannes; use swap_bytes to correct for 
    27392739# this. 
    27402740sub i2c_smbus_read_word_data 
    27412741{ 
    2742   my ($file,$command) = @_; 
     2742  my ($file, $command) = @_; 
    27432743  my @data; 
    27442744  i2c_smbus_access $file, SMBUS_READ, $command, SMBUS_WORD_DATA, \@data 
     
    28392839#  with field 'i2c_sub_addrs', containing a reference to a list of 
    28402840#       other I2C addresses (if this is an I2C detection) 
    2841 #  with field 'isa_addr' containing the ISA address this chip is on  
     2841#  with field 'isa_addr' containing the ISA address this chip is on 
    28422842#       (if this is an ISA detection) 
    28432843#  with field 'conf', containing the confidence level of this detection 
     
    28532853sub add_i2c_to_chips_detected 
    28542854{ 
    2855   my ($chipdriver,$datahash) = @_; 
    2856   my ($i,$new_detected_ref,$new_misdetected_ref,$detected_ref,$misdetected_ref, 
    2857       $main_entry,$detected_entry,$put_in_detected,@hash_addrs,@entry_addrs, 
     2855  my ($chipdriver, $datahash) = @_; 
     2856  my ($i, $new_detected_ref, $new_misdetected_ref, $detected_ref, $misdetected_ref, 
     2857      $main_entry, $detected_entry, $put_in_detected, @hash_addrs, @entry_addrs, 
    28582858      $do_not_add); 
    28592859 
     
    29072907    # be told to ignore valid addresses). 
    29082908    @hash_addrs = ($datahash->{i2c_addr}); 
    2909     push @hash_addrs, @{$datahash->{i2c_sub_addrs}}  
     2909    push @hash_addrs, @{$datahash->{i2c_sub_addrs}} 
    29102910         if exists $datahash->{i2c_sub_addrs}; 
    29112911    foreach $main_entry (@chips_detected) { 
     
    29182918        if ($detected_ref->[$i]->{i2c_devnr} == $datahash->{i2c_devnr} and 
    29192919            any_list_match \@entry_addrs, \@hash_addrs) { 
    2920           push @$misdetected_ref,$detected_ref->[$i] 
     2920          push @$misdetected_ref, $detected_ref->[$i] 
    29212921            unless $chipdriver eq $main_entry->{driver}; 
    29222922          splice @$detected_ref, $i, 1; 
     
    29282928    push @$new_detected_ref, $datahash; 
    29292929  } else { 
    2930     # No hard work here  
     2930    # No hard work here 
    29312931    push @$new_misdetected_ref, $datahash 
    29322932      unless $do_not_add; 
     
    29422942sub add_isa_to_chips_detected 
    29432943{ 
    2944   my ($alias_detect,$chipdriver,$datahash) = @_; 
    2945   my ($i,$new_detected_ref,$new_misdetected_ref,$detected_ref,$misdetected_ref, 
    2946       $main_entry,$isalias); 
     2944  my ($alias_detect, $chipdriver, $datahash) = @_; 
     2945  my ($i, $new_detected_ref, $new_misdetected_ref, $detected_ref, $misdetected_ref, 
     2946      $main_entry, $isalias); 
    29472947 
    29482948  # First determine where the hash has to be added. 
     
    29752975        next; 
    29762976      binmode FILE; 
    2977       i2c_set_slave_addr \*FILE,$new_misdetected_ref->[$i]->{i2c_addr} or 
     2977      i2c_set_slave_addr \*FILE, $new_misdetected_ref->[$i]->{i2c_addr} or 
    29782978           print("Can't set I2C address for ", 
    29792979                 "$dev_i2c$new_misdetected_ref->[$i]->{i2c_devnr}?!?\n"), 
    29802980           next; 
    2981       if (&$alias_detect ($datahash->{isa_addr},\*FILE, 
     2981      if (&$alias_detect ($datahash->{isa_addr}, \*FILE, 
    29822982                          $new_misdetected_ref->[$i]->{i2c_addr})) { 
    29832983        $new_misdetected_ref->[$i]->{isa_addr} = $datahash->{isa_addr}; 
    2984         return $new_misdetected_ref->[$i];  
     2984        return $new_misdetected_ref->[$i]; 
    29852985      } 
    29862986    } 
     
    29972997        next; 
    29982998      binmode FILE; 
    2999       i2c_set_slave_addr \*FILE,$new_detected_ref->[$i]->{i2c_addr} or 
     2999      i2c_set_slave_addr \*FILE, $new_detected_ref->[$i]->{i2c_addr} or 
    30003000           print("Can't set I2C address for ", 
    30013001                 "$dev_i2c$new_detected_ref->[$i]->{i2c_devnr}?!?\n"), 
    30023002           next; 
    3003       if (&$alias_detect ($datahash->{isa_addr},\*FILE, 
     3003      if (&$alias_detect ($datahash->{isa_addr}, \*FILE, 
    30043004                          $new_detected_ref->[$i]->{i2c_addr})) { 
    30053005        $new_detected_ref->[$i]->{isa_addr} = $datahash->{isa_addr}; 
     
    30273027            unless $main_entry->{driver} eq $chipdriver; 
    3028