2
0
mirror of https://github.com/lm-sensors/lm-sensors synced 2025-08-31 06:15:15 +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:
Jean Delvare
2008-11-24 17:26:33 +00:00
parent 09d444883d
commit 4884bd8652

View File

@@ -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);
}