aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/acpica
diff options
context:
space:
mode:
authorNate Lawson <njl@FreeBSD.org>2004-06-30 16:00:20 +0000
committerNate Lawson <njl@FreeBSD.org>2004-06-30 16:00:20 +0000
commit340a7f6a9b9637dfee75cf0b0302f3e9f0219576 (patch)
tree9314ee723c7bc0fb8b820a6e6456b258c6baa757 /sys/dev/acpica
parentd8dbb9937b0ea4b8a0ee10d9a452e6551171a899 (diff)
Notes
Diffstat (limited to 'sys/dev/acpica')
-rw-r--r--sys/dev/acpica/acpi_ec.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/sys/dev/acpica/acpi_ec.c b/sys/dev/acpica/acpi_ec.c
index e2da71d6e7d1e..b20472d8e29f4 100644
--- a/sys/dev/acpica/acpi_ec.c
+++ b/sys/dev/acpica/acpi_ec.c
@@ -339,11 +339,13 @@ static ACPI_STATUS EcWrite(struct acpi_ec_softc *sc, UINT8 Address,
UINT8 *Data);
static int acpi_ec_probe(device_t dev);
static int acpi_ec_attach(device_t dev);
+static int acpi_ec_shutdown(device_t dev);
static device_method_t acpi_ec_methods[] = {
/* Device interface */
DEVMETHOD(device_probe, acpi_ec_probe),
DEVMETHOD(device_attach, acpi_ec_attach),
+ DEVMETHOD(device_shutdown, acpi_ec_shutdown),
{0, 0}
};
@@ -639,6 +641,17 @@ error:
return (ENXIO);
}
+static int
+acpi_ec_shutdown(device_t dev)
+{
+ struct acpi_ec_softc *sc;
+
+ /* Disable the GPE so we don't get EC events during shutdown. */
+ sc = device_get_softc(dev);
+ AcpiDisableGpe(sc->ec_gpehandle, sc->ec_gpebit, ACPI_NOT_ISR);
+ return (0);
+}
+
static void
EcGpeQueryHandler(void *Context)
{