Changeset 5491
- Timestamp:
- 12/01/08 16:35:10 (5 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
lm-sensors/branches/lm-sensors-3.0.0/prog/detect/sensors-detect
r5490 r5491 4795 4795 sub generate_modprobes 4796 4796 { 4797 my ($chip, $detection, @optionlist,$adap);4797 my ($chip, $detection, $adap); 4798 4798 my ($isa, $ipmi); 4799 4799 my ($modprobes, $configfile); … … 4821 4821 unless (kernel_version_at_least(2, 6, 28)) { 4822 4822 foreach $chip (@chips_detected) { 4823 @optionlist = ();4823 my @optionlist = (); 4824 4824 foreach $detection (@{$chip->{detected}}) { 4825 if (exists $detection->{i2c_addr} and4826 exists $detection->{isa_addr} and4827 $i2c_adapters[$detection->{i2c_devnr}]->{used}) {4828 push @optionlist, 4829 $detection->{i2c_devnr},4830 $detection->{i2c_addr};4831 }4825 next unless exists $detection->{i2c_addr} 4826 && exists $detection->{isa_addr} 4827 && $i2c_adapters[$detection->{i2c_devnr}]->{used}; 4828 4829 push @optionlist, sprintf("%d,0x%02x", 4830 $detection->{i2c_devnr}, 4831 $detection->{i2c_addr}); 4832 4832 } 4833 4833 … … 4835 4835 $configfile = "# hwmon module options\n" 4836 4836 unless defined $configfile; 4837 $configfile .= "options $chip->{driver}"; 4838 $configfile .= sprintf(" ignore=%d,0x%02x", 4839 shift @optionlist, 4840 shift @optionlist); 4841 $configfile .= sprintf(",%d,0x%02x", shift @optionlist, 4842 shift @optionlist) while @optionlist; 4843 $configfile .= "\n"; 4837 $configfile .= "options $chip->{driver} ignore=". 4838 (join ",", @optionlist)."\n"; 4844 4839 } 4845 4840 }
