summaryrefslogtreecommitdiffstats
path: root/sys/dev/acpica
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/acpica')
-rw-r--r--sys/dev/acpica/acpi_ec.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/sys/dev/acpica/acpi_ec.c b/sys/dev/acpica/acpi_ec.c
index c0a4207..1ad4ccc 100644
--- a/sys/dev/acpica/acpi_ec.c
+++ b/sys/dev/acpica/acpi_ec.c
@@ -697,9 +697,13 @@ EcSpaceSetup(ACPI_HANDLE Region, UINT32 Function, void *Context,
ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__);
/*
- * Just pass the context through, there's nothing to do here.
+ * If deactivating a region, always set the output to NULL. Otherwise,
+ * just pass the context through.
*/
- *RegionContext = Context;
+ if (Function == ACPI_REGION_DEACTIVATE)
+ *RegionContext = NULL;
+ else
+ *RegionContext = Context;
return_ACPI_STATUS (AE_OK);
}
OpenPOWER on IntegriCloud