Changeset 5428

Show
Ignore:
Timestamp:
11/24/08 18:26:33 (6 years ago)
Author:
khali
Message:

Clean up smartbatt_detect.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • lm-sensors/branches/lm-sensors-3.0.0/prog/detect/sensors-detect

    r5427 r5428  
    48144814{ 
    48154815  my ($file, $addr) = @_; 
    4816   # check some registers 
    4817   if (i2c_smbus_read_word_data($file, 0x08) == 0xffff) { 
    4818         return; 
    4819   } 
    4820   if (i2c_smbus_read_word_data($file, 0x09) == 0xffff) { 
    4821         return; 
    4822   } 
    4823   if (i2c_smbus_read_word_data($file, 0x0a) == 0xffff) { 
    4824         return; 
    4825   } 
     4816 
     4817  return if i2c_smbus_read_word_data($file, 0x08) == 0xffff 
     4818         || i2c_smbus_read_word_data($file, 0x09) == 0xffff 
     4819         || i2c_smbus_read_word_data($file, 0x0a) == 0xffff; 
    48264820  return (5); 
    48274821}