Modify the fix in rev 1.16 slightly. Instead of setting the cap to zero,
just skip summing it if it's unknown. MFC after: 1 day
This commit is contained in:
parent
199c7836bc
commit
84cdcfb36f
@ -227,9 +227,8 @@ acpi_battery_get_battinfo(device_t dev, struct acpi_battinfo *battinfo)
|
||||
total_min += bi[i].min;
|
||||
|
||||
/* If this battery is not present, don't use its capacity. */
|
||||
if (bi[i].cap == -1)
|
||||
bi[i].cap = 0;
|
||||
total_cap += bi[i].cap;
|
||||
if (bi[i].cap != -1)
|
||||
total_cap += bi[i].cap;
|
||||
}
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user