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@
-/* $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
*
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);
}