summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorMike Larkin <mlarkin@cvs.openbsd.org>2018-06-29 04:55:56 +0000
committerMike Larkin <mlarkin@cvs.openbsd.org>2018-06-29 04:55:56 +0000
commit50244e19f8b4d44f60363f0a32e61325ac39f258 (patch)
tree6597862146c18093c0a70038cd925699cf02e008 /sys
parent229108f2f30345ed145858d61f4a6ed3e19ac9a2 (diff)
ACPI: Allow (with warning) GPE handler reassignment, instead of returning
a failure code. ok kettenis
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/acpi/acpi.c11
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;