powermgmt: Clean up some convoluted #ifdefs
Makes it more explicit what code is used under which circumstances. Change-Id: I0a482dd48e1eb4b119ca6d8dca2b8aa450445fd1
This commit is contained in:
parent
0d0640e57a
commit
37bfcab23f
1 changed files with 6 additions and 3 deletions
|
@ -197,12 +197,15 @@ int battery_time(void)
|
|||
|
||||
#ifndef CURRENT_NORMAL /* no estimation without current */
|
||||
return -1;
|
||||
#endif
|
||||
#else
|
||||
if (battery_capacity <= 0) /* nor without capacity */
|
||||
return -1;
|
||||
|
||||
#endif
|
||||
return _battery_time();
|
||||
#endif
|
||||
|
||||
#else
|
||||
return _battery_time();
|
||||
#endif
|
||||
}
|
||||
|
||||
/* Returns battery level in percent */
|
||||
|
|
Loading…
Reference in a new issue