mirror of
https://github.com/lm-sensors/lm-sensors
synced 2025-08-30 05:48:07 +00:00
Reindent Super-I/O and CPU core detection functions.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@5475 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
parent
05db7e0c10
commit
15e40f9e18
@ -2913,7 +2913,8 @@ sub probe_superio
|
||||
}
|
||||
print "Success!\n";
|
||||
printf " (address 0x\%x, driver `%s')\n", $addr, $chip->{driver};
|
||||
my $new_hash = { conf => 9,
|
||||
my $new_hash = {
|
||||
conf => 9,
|
||||
isa_addr => $addr,
|
||||
chipname => $chip->{name}
|
||||
};
|
||||
@ -2934,9 +2935,7 @@ sub smsc_ns_detect_superio
|
||||
# read alternate device ID register
|
||||
outb($addrreg, 0x0d);
|
||||
$val = inb($datareg);
|
||||
if ($val == 0x00 || $val == 0xff) {
|
||||
return 0;
|
||||
}
|
||||
return 0 if $val == 0x00 || $val == 0xff;
|
||||
|
||||
print "Yes\n";
|
||||
|
||||
@ -2974,6 +2973,7 @@ sub scan_superio
|
||||
exit_superio($addrreg, $datareg);
|
||||
last FAMILY;
|
||||
}
|
||||
|
||||
# did it work?
|
||||
outb($addrreg, $superio{devidreg});
|
||||
$val = inb($datareg);
|
||||
@ -2987,8 +2987,10 @@ sub scan_superio
|
||||
|
||||
$found = 0;
|
||||
foreach my $chip (@{$family->{chips}}) {
|
||||
if (($chip->{devid} > 0xff && ($val & ($chip->{devid_mask} || 0xffff)) == $chip->{devid})
|
||||
|| ($chip->{devid} <= 0xff && ($val >> 8) == $chip->{devid})) {
|
||||
if (($chip->{devid} > 0xff &&
|
||||
($val & ($chip->{devid_mask} || 0xffff)) == $chip->{devid})
|
||||
|| ($chip->{devid} <= 0xff &&
|
||||
($val >> 8) == $chip->{devid})) {
|
||||
probe_superio($addrreg, $datareg, $chip);
|
||||
$found++;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user