summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorAnton Lindqvist <anton@cvs.openbsd.org>2022-06-28 16:29:57 +0000
committerAnton Lindqvist <anton@cvs.openbsd.org>2022-06-28 16:29:57 +0000
commitd8bab98ba1221235efaafe3eb07f8f4301e25582 (patch)
treebc4f42d5402ca79ae4c18a0067edaa49076e7d5b /sys/dev
parent347fcac9907de444df607463bba31e5f8178f76d (diff)
A com_acpi_softc pointer is used as the interrupt callback cookie which
is later on interpreted as a com_softc pointer. This is not a problem in practice as a com_softc structure is the first member of the com_acpi_softc structure. Using the actual types consistently yields a better symmetry in my opinion between registering the interrupt and the corresponding interrupt handler. ok deraadt@ kettenis@
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/acpi/com_acpi.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/dev/acpi/com_acpi.c b/sys/dev/acpi/com_acpi.c
index 9c1e4af0426..0289ca2ea18 100644
--- a/sys/dev/acpi/com_acpi.c
+++ b/sys/dev/acpi/com_acpi.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: com_acpi.c,v 1.8 2022/04/06 18:59:27 naddy Exp $ */
+/* $OpenBSD: com_acpi.c,v 1.9 2022/06/28 16:29:56 anton Exp $ */
/*
* Copyright (c) 2018 Mark Kettenis
*
@@ -159,9 +159,9 @@ com_acpi_is_designware(const char *hid)
int
com_acpi_intr_designware(void *cookie)
{
- struct com_softc *sc = cookie;
+ struct com_acpi_softc *sc = cookie;
- com_read_reg(sc, com_usr);
+ com_read_reg(&sc->sc, com_usr);
- return comintr(sc);
+ return comintr(&sc->sc);
}