diff options
| author | jruoho <jruoho@NetBSD.org> | 2010-03-08 11:45:45 +0000 |
|---|---|---|
| committer | jruoho <jruoho@NetBSD.org> | 2010-03-08 11:45:45 +0000 |
| commit | aa4b9b510c66147919ce156cdfd9f096cbbf7cf9 (patch) | |
| tree | 467d6eb00978be47c2cf95c443d1d6bfc3def7d5 /sys/dev | |
| parent | 10690c8c4f42c0252f7fa1cd113ccb4b4937e388 (diff) | |
Use the predefined ACPI_STA_BATTERY_PRESENT instead of defining a local one.
Diffstat (limited to 'sys/dev')
| -rw-r--r-- | sys/dev/acpi/acpi_bat.c | 19 |
1 files changed, 3 insertions, 16 deletions
diff --git a/sys/dev/acpi/acpi_bat.c b/sys/dev/acpi/acpi_bat.c index 900e6e88299..355b2bd6140 100644 --- a/sys/dev/acpi/acpi_bat.c +++ b/sys/dev/acpi/acpi_bat.c @@ -1,4 +1,4 @@ -/* $NetBSD: acpi_bat.c,v 1.84 2010/03/05 14:00:16 jruoho Exp $ */ +/* $NetBSD: acpi_bat.c,v 1.85 2010/03/08 11:45:45 jruoho Exp $ */ /*- * Copyright (c) 2003 The NetBSD Foundation, Inc. @@ -75,7 +75,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: acpi_bat.c,v 1.84 2010/03/05 14:00:16 jruoho Exp $"); +__KERNEL_RCSID(0, "$NetBSD: acpi_bat.c,v 1.85 2010/03/08 11:45:45 jruoho Exp $"); #include <sys/param.h> #include <sys/condvar.h> @@ -166,19 +166,6 @@ static const char * const bat_hid[] = { #define ACPIBAT_ST_CRITICAL 0x00000004 /* battery is critical */ /* - * Flags for battery status from _STA return. Note that - * this differs from the conventional evaluation of _STA: - * - * "Unlike most other devices, when a battery is inserted or - * removed from the system, the device itself (the battery bay) - * is still considered to be present in the system. For most - * systems, the _STA for this device will always return a value - * with bits 0-3 set and will toggle bit 4 to indicate the actual - * presence of a battery. (ACPI 3.0, sec. 10.2.1, p. 320.)" - */ -#define ACPIBAT_STA_PRESENT 0x00000010 /* battery present */ - -/* * A value used when _BST or _BIF is teporarily unknown (see ibid.). */ #define ACPIBAT_VAL_UNKNOWN 0xFFFFFFFF @@ -318,7 +305,7 @@ acpibat_get_sta(device_t dv) sc->sc_sensor[ACPIBAT_PRESENT].state = ENVSYS_SVALID; - if ((val & ACPIBAT_STA_PRESENT) == 0) { + if ((val & ACPI_STA_BATTERY_PRESENT) == 0) { sc->sc_sensor[ACPIBAT_PRESENT].value_cur = 0; return 0; } |
