From 3cdf96e0f422e842fd1fdefd574ccf10c347b61e Mon Sep 17 00:00:00 2001 From: Jean Delvare Date: Thu, 27 Nov 2008 17:47:07 +0000 Subject: [PATCH] Cleanup generate_modprobes() a bit. git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@5442 7894878c-1315-0410-8ee3-d5d059ff63e0 --- prog/detect/sensors-detect | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/prog/detect/sensors-detect b/prog/detect/sensors-detect index 343f7f4e..dfc2f192 100755 --- a/prog/detect/sensors-detect +++ b/prog/detect/sensors-detect @@ -5137,10 +5137,9 @@ sub print_chips_report sub generate_modprobes { - my ($chip, $detection, @optionlist, $isa, $adap); - my $ipmi = 0; - my $modprobes; - my $configfile; + my ($chip, $detection, @optionlist, $adap); + my ($isa, $ipmi); + my ($modprobes, $configfile); # Handle aliases # As of kernel 2.6.28, alias detection is handled by kernel drivers @@ -5167,7 +5166,6 @@ sub generate_modprobes } } - $isa = 0; foreach $chip (@chips_detected) { foreach $detection (@{$chip->{detected}}) { # Tag adapters which host hardware monitoring chips we want to access @@ -5179,9 +5177,9 @@ sub generate_modprobes if (exists $detection->{isa_addr}) { $isa = 1; } - if ($chip->{driver} eq "ipmisensors") { - $ipmi = 1; - } + } + if ($chip->{driver} eq "ipmisensors") { + $ipmi = 1; } }