From eb0b6b05e446502b69adaee892659eed5b4b041d Mon Sep 17 00:00:00 2001 From: njl Date: Thu, 11 Aug 2005 17:12:57 +0000 Subject: 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 --- sys/dev/acpica/acpi_battery.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sys/dev/acpica/acpi_battery.c b/sys/dev/acpica/acpi_battery.c index 4099468..218e4d9 100644 --- a/sys/dev/acpica/acpi_battery.c +++ b/sys/dev/acpica/acpi_battery.c @@ -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; } /* -- cgit v1.1