summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJung-uk Kim <jkim@FreeBSD.org>2008-01-22 17:53:40 +0000
committerJung-uk Kim <jkim@FreeBSD.org>2008-01-22 17:53:40 +0000
commitbbfa8b3fc44b3e11752031420637ff34a604045b (patch)
tree7cd5001176f79f94940e90e320382eccac12f560
parentba56452d29264179befd14fa22faa5e579ab2424 (diff)
Notes
-rw-r--r--sys/dev/acpica/acpi_battery.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/dev/acpica/acpi_battery.c b/sys/dev/acpica/acpi_battery.c
index cfbae03e2f5b..f289b2bd64d2 100644
--- a/sys/dev/acpica/acpi_battery.c
+++ b/sys/dev/acpica/acpi_battery.c
@@ -167,11 +167,12 @@ acpi_battery_get_battinfo(device_t dev, struct acpi_battinfo *battinfo)
dev_idx = i;
/*
- * Be sure we can get various info from the battery. Note that we
- * can't check acpi_BatteryIsPresent() because smart batteries only
+ * Be sure we can get various info from the battery. Note that
+ * acpi_BatteryIsPresent() is not enough because smart batteries only
* return that the device is present.
*/
- if (ACPI_BATT_GET_STATUS(batt_dev, &bst[i]) != 0 ||
+ if (!acpi_BatteryIsPresent(batt_dev) ||
+ ACPI_BATT_GET_STATUS(batt_dev, &bst[i]) != 0 ||
ACPI_BATT_GET_INFO(batt_dev, bif) != 0)
continue;