mirror of
https://github.com/lm-sensors/lm-sensors.git
synced 2026-11-24 20:21:43 +00:00
Clean up smartbatt_detect.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@5428 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
1 parent
09d444883d
commit
4884bd8652
1 file changed
+4
-10
@@ -4813,16 +4813,10 @@ sub fintek_detect
|
||||
sub smartbatt_detect
|
||||
{
|
||||
my ($file, $addr) = @_;
|
||||
# check some registers
|
||||
if (i2c_smbus_read_word_data($file, 0x08) == 0xffff) {
|
||||
return;
|
||||
}
|
||||
if (i2c_smbus_read_word_data($file, 0x09) == 0xffff) {
|
||||
return;
|
||||
}
|
||||
if (i2c_smbus_read_word_data($file, 0x0a) == 0xffff) {
|
||||
return;
|
||||
}
|
||||
|
||||
return if i2c_smbus_read_word_data($file, 0x08) == 0xffff
|
||||
|| i2c_smbus_read_word_data($file, 0x09) == 0xffff
|
||||
|| i2c_smbus_read_word_data($file, 0x0a) == 0xffff;
|
||||
return (5);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user