Convert battery capacity/rate from mA to mW only when summary is requested.
Unconditional conversion causes incorrect rate units reported by acpiconf. MFC after: 2 weeks
This commit is contained in:
parent
7b600fafde
commit
2a7f0d1fff
@ -197,7 +197,7 @@ acpi_battery_get_battinfo(device_t dev, struct acpi_battinfo *battinfo)
|
||||
* is 0 (due to some error reading the battery), skip this
|
||||
* conversion.
|
||||
*/
|
||||
if (bif->units == ACPI_BIF_UNITS_MA && bif->dvol != 0) {
|
||||
if (bif->units == ACPI_BIF_UNITS_MA && bif->dvol != 0 && dev == NULL) {
|
||||
bst[i].rate = (bst[i].rate * bif->dvol) / 1000;
|
||||
bst[i].cap = (bst[i].cap * bif->dvol) / 1000;
|
||||
bif->lfcap = (bif->lfcap * bif->dvol) / 1000;
|
||||
|
Loading…
Reference in New Issue
Block a user