Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/acpi Do not complain if the _AEI method is not found...



details:   https://anonhg.NetBSD.org/src/rev/daf35f072d85
branches:  trunk
changeset: 445333:daf35f072d85
user:      jmcneill <jmcneill%NetBSD.org@localhost>
date:      Tue Oct 23 09:19:02 2018 +0000

description:
Do not complain if the _AEI method is not found, just skip installing the
interrupt handler.

diffstat:

 sys/dev/acpi/plgpio_acpi.c |  10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diffs (31 lines):

diff -r 049eb341138f -r daf35f072d85 sys/dev/acpi/plgpio_acpi.c
--- a/sys/dev/acpi/plgpio_acpi.c        Tue Oct 23 09:15:35 2018 +0000
+++ b/sys/dev/acpi/plgpio_acpi.c        Tue Oct 23 09:19:02 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: plgpio_acpi.c,v 1.3 2018/10/22 22:29:35 jmcneill Exp $ */
+/* $NetBSD: plgpio_acpi.c,v 1.4 2018/10/23 09:19:02 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: plgpio_acpi.c,v 1.3 2018/10/22 22:29:35 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: plgpio_acpi.c,v 1.4 2018/10/23 09:19:02 jmcneill Exp $");
 
 #include <sys/param.h>
 #include <sys/bus.h>
@@ -123,8 +123,10 @@
 
        plgpio_attach(sc);
 
-       if (ACPI_FAILURE(acpi_event_create_gpio(self, asc->sc_handle, plgpio_acpi_register_event, asc))) {
-               aprint_error_dev(self, "failed to create events\n");
+       rv = acpi_event_create_gpio(self, asc->sc_handle, plgpio_acpi_register_event, asc);
+       if (ACPI_FAILURE(rv)) {
+               if (rv != AE_NOT_FOUND)
+                       aprint_error_dev(self, "failed to create events: %s\n", AcpiFormatException(rv));
                goto done;
        }
 



Home | Main Index | Thread Index | Old Index