diff options
author | 2018-06-29 04:55:55 +0000 | |
---|---|---|
committer | 2018-06-29 04:55:55 +0000 | |
commit | f73dea9f5c5a77ff2f83b8afa39e7cf6351ff3f7 (patch) | |
tree | dbe84ee9f07ce73b36e0b08f4eb7408984cc0390 | |
parent | vmm: add more information to a debug printf when the guest %xcr0 doesn't (diff) | |
download | wireguard-openbsd-f73dea9f5c5a77ff2f83b8afa39e7cf6351ff3f7.tar.xz wireguard-openbsd-f73dea9f5c5a77ff2f83b8afa39e7cf6351ff3f7.zip |
ACPI: Allow (with warning) GPE handler reassignment, instead of returning
a failure code.
ok kettenis
-rw-r--r-- | sys/dev/acpi/acpi.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/sys/dev/acpi/acpi.c b/sys/dev/acpi/acpi.c index e21464320a3..cddd7350c5b 100644 --- a/sys/dev/acpi/acpi.c +++ b/sys/dev/acpi/acpi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: acpi.c,v 1.347 2018/06/26 07:38:39 mlarkin Exp $ */ +/* $OpenBSD: acpi.c,v 1.348 2018/06/29 04:55:55 mlarkin Exp $ */ /* * Copyright (c) 2005 Thorsten Lockert <tholo@sigmasoft.com> * Copyright (c) 2005 Jordan Hargrave <jordan@openbsd.org> @@ -2191,11 +2191,10 @@ acpi_set_gpehandler(struct acpi_softc *sc, int gpe, int (*handler) ptbl = acpi_find_gpe(sc, gpe); if (ptbl == NULL || handler == NULL) return -EINVAL; - if (ptbl->handler != NULL) { - dnprintf(10, "error: GPE %.2x already enabled\n", gpe); - return -EBUSY; - } - dnprintf(50, "Adding GPE handler %.2x (%s)\n", gpe, + if (ptbl->handler != NULL) + printf("%s: GPE 0x%.2x already enabled\n", DEVNAME(sc), gpe); + + dnprintf(50, "Adding GPE handler 0x%.2x (%s)\n", gpe, edge ? "edge" : "level"); ptbl->handler = handler; ptbl->arg = arg; |