summaryrefslogtreecommitdiff
path: root/sys/dev/i2c
diff options
context:
space:
mode:
authorbouyer <bouyer@NetBSD.org>2018-03-20 12:14:52 +0000
committerbouyer <bouyer@NetBSD.org>2018-03-20 12:14:52 +0000
commit0d2d508cb9ab75d7cfa4e673df02f8984d869717 (patch)
treeb7afbb970fed814ff5bfa6f0c0a58f4d7a68ea02 /sys/dev/i2c
parentf97975bff06b35e69d1082e7d57e4d5b65d54fd9 (diff)
Allow registering ACPI interrupt handlers with a xname.
AcpiOsInstallInterruptHandler(), part of ACPICA API, doesn't allow passing the xname. I extend the API with AcpiOsInstallInterruptHandler_xname() for this purpose, and change acpi_md_OsInstallInterruptHandler() to accept and use the xname (ia64 doens't use it). The xname was hardcoded to "acpi SCI" in the x86 acpi_md_OsInstallInterruptHandler(), so I make AcpiOsInstallInterruptHandler() call AcpiOsInstallInterruptHandler_xname with xname = "acpi SCI". Now 'vmstat -i' shows the device's name instead of "acpi SCI" for for i2c HID interrupts. Proposed on tech-kern@ on Dec 29.
Diffstat (limited to 'sys/dev/i2c')
-rw-r--r--sys/dev/i2c/ihidev.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/dev/i2c/ihidev.c b/sys/dev/i2c/ihidev.c
index 93bdf6f0a34..0142e736230 100644
--- a/sys/dev/i2c/ihidev.c
+++ b/sys/dev/i2c/ihidev.c
@@ -1,4 +1,4 @@
-/* $NetBSD: ihidev.c,v 1.1 2017/12/10 17:05:54 bouyer Exp $ */
+/* $NetBSD: ihidev.c,v 1.2 2018/03/20 12:14:52 bouyer Exp $ */
/* $OpenBSD ihidev.c,v 1.13 2017/04/08 02:57:23 deraadt Exp $ */
/*-
@@ -54,7 +54,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ihidev.c,v 1.1 2017/12/10 17:05:54 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ihidev.c,v 1.2 2018/03/20 12:14:52 bouyer Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -208,7 +208,8 @@ ihidev_attach(device_t parent, device_t self, void *aux)
{
char buf[100];
- sc->sc_ih = acpi_intr_establish(self, sc->sc_phandle, ihidev_intr, sc);
+ sc->sc_ih = acpi_intr_establish(self,
+ sc->sc_phandle, ihidev_intr, sc, device_xname(self));
if (sc->sc_ih == NULL)
aprint_error_dev(self, "can't establish interrupt\n");
aprint_normal_dev(self, "interrupting at %s\n",