aboutsummaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorJung-uk Kim <jkim@FreeBSD.org>2007-11-20 18:35:36 +0000
committerJung-uk Kim <jkim@FreeBSD.org>2007-11-20 18:35:36 +0000
commit1de9b7e4c9a5db8bfa753a83147a802c2f4f2a05 (patch)
treeb455bf3bf4f4ded329af2150b16acdd04bb5c1b2 /sys/dev
parent965b55e2b4bd52373f58a3e3d6043384773699c5 (diff)
Notes
Diffstat (limited to 'sys/dev')
-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 cfbae03e2f5b9..f289b2bd64d28 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;