mirror of
https://github.com/lm-sensors/lm-sensors
synced 2025-09-04 00:05:10 +00:00
Coding style fixes.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@5262 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
@@ -4397,8 +4397,7 @@ sub lm85_detect
|
|||||||
return if $verstep != 0x68; # EMC6D103
|
return if $verstep != 0x68; # EMC6D103
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($vendor == 0x41) # Analog Devices
|
if ($vendor == 0x41) { # Analog Devices
|
||||||
{
|
|
||||||
return if i2c_smbus_read_byte_data($file, 0x3d) != 0x27;
|
return if i2c_smbus_read_byte_data($file, 0x3d) != 0x27;
|
||||||
return (8);
|
return (8);
|
||||||
}
|
}
|
||||||
@@ -4832,13 +4831,10 @@ sub adm1021_detect
|
|||||||
return if $chip == 7 and $man_id != 0x54;
|
return if $chip == 7 and $man_id != 0x54;
|
||||||
|
|
||||||
# Check unused bits
|
# Check unused bits
|
||||||
if ($chip == 5) # LM84
|
if ($chip == 5) { # LM84
|
||||||
{
|
|
||||||
return if ($status & 0xab) != 0;
|
return if ($status & 0xab) != 0;
|
||||||
return if ($conf & 0x7f) != 0;
|
return if ($conf & 0x7f) != 0;
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
{
|
|
||||||
return if ($status & 0x03) != 0;
|
return if ($status & 0x03) != 0;
|
||||||
return if ($conf & 0x3f) != 0;
|
return if ($conf & 0x3f) != 0;
|
||||||
return if ($convrate & 0xf8) != 0;
|
return if ($convrate & 0xf8) != 0;
|
||||||
@@ -4848,8 +4844,7 @@ sub adm1021_detect
|
|||||||
# We verify several assertions (6 for the MAX1617, 4 for the LM84) and
|
# We verify several assertions (6 for the MAX1617, 4 for the LM84) and
|
||||||
# discard the chip if any fail. Note that these checks are not done
|
# discard the chip if any fail. Note that these checks are not done
|
||||||
# by the adm1021 driver.
|
# by the adm1021 driver.
|
||||||
if ($chip == 2 || $chip == 5)
|
if ($chip == 2 || $chip == 5) {
|
||||||
{
|
|
||||||
my $lte = i2c_smbus_read_byte_data($file, 0x00);
|
my $lte = i2c_smbus_read_byte_data($file, 0x00);
|
||||||
my $rte = i2c_smbus_read_byte_data($file, 0x01);
|
my $rte = i2c_smbus_read_byte_data($file, 0x01);
|
||||||
my $lhi = i2c_smbus_read_byte_data($file, 0x05);
|
my $lhi = i2c_smbus_read_byte_data($file, 0x05);
|
||||||
@@ -4866,8 +4861,7 @@ sub adm1021_detect
|
|||||||
# Negative high limits
|
# Negative high limits
|
||||||
return if ($lhi & 0x80) or ($rhi & 0x80);
|
return if ($lhi & 0x80) or ($rhi & 0x80);
|
||||||
# Low limits over high limits
|
# Low limits over high limits
|
||||||
if ($chip != 5) # LM84 doesn't have low limits
|
if ($chip != 5) { # LM84 doesn't have low limits
|
||||||
{
|
|
||||||
$llo-=256 if ($llo & 0x80);
|
$llo-=256 if ($llo & 0x80);
|
||||||
$rlo-=256 if ($rlo & 0x80);
|
$rlo-=256 if ($rlo & 0x80);
|
||||||
return if ($llo > $lhi) or ($rlo > $rhi);
|
return if ($llo > $lhi) or ($rlo > $rhi);
|
||||||
|
Reference in New Issue
Block a user