summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/acpi/acpiac.c5
-rw-r--r--sys/dev/acpi/acpibat.c4
2 files changed, 7 insertions, 2 deletions
diff --git a/sys/dev/acpi/acpiac.c b/sys/dev/acpi/acpiac.c
index 1e534c44703..d4b48cf0780 100644
--- a/sys/dev/acpi/acpiac.c
+++ b/sys/dev/acpi/acpiac.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: acpiac.c,v 1.27 2009/03/11 20:37:46 jordan Exp $ */
+/* $OpenBSD: acpiac.c,v 1.28 2010/08/07 16:55:38 canacar Exp $ */
/*
* Copyright (c) 2005 Marco Peereboom <marco@openbsd.org>
*
@@ -16,11 +16,13 @@
*/
#include <sys/param.h>
+#include <sys/event.h>
#include <sys/systm.h>
#include <sys/device.h>
#include <sys/malloc.h>
#include <machine/bus.h>
+#include <machine/apmvar.h>
#include <dev/acpi/acpireg.h>
#include <dev/acpi/acpivar.h>
@@ -95,6 +97,7 @@ acpiac_refresh(void *arg)
acpiac_getsta(sc);
sc->sc_sens[0].value = sc->sc_ac_stat;
+ acpi_record_event(sc->sc_acpi, APM_POWER_CHANGE);
}
int
diff --git a/sys/dev/acpi/acpibat.c b/sys/dev/acpi/acpibat.c
index ee6bcdb9977..882846b6c60 100644
--- a/sys/dev/acpi/acpibat.c
+++ b/sys/dev/acpi/acpibat.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: acpibat.c,v 1.56 2010/07/21 19:35:15 deraadt Exp $ */
+/* $OpenBSD: acpibat.c,v 1.57 2010/08/07 16:55:38 canacar Exp $ */
/*
* Copyright (c) 2005 Marco Peereboom <marco@openbsd.org>
*
@@ -23,6 +23,7 @@
#include <sys/sensors.h>
#include <machine/bus.h>
+#include <machine/apmvar.h>
#include <dev/acpi/acpireg.h>
#include <dev/acpi/acpivar.h>
@@ -279,6 +280,7 @@ acpibat_refresh(void *arg)
sc->sc_sens[7].status = SENSOR_S_UNSPEC;
sc->sc_sens[7].flags = 0;
}
+ acpi_record_event(sc->sc_acpi, APM_POWER_CHANGE);
}
int