-/* $OpenBSD: acpi.c,v 1.411 2022/02/09 23:54:34 deraadt Exp $ */
+/* $OpenBSD: acpi.c,v 1.412 2022/02/10 07:39:20 visa Exp $ */
/*
* Copyright (c) 2005 Thorsten Lockert <tholo@sigmasoft.com>
* Copyright (c) 2005 Jordan Hargrave <jordan@openbsd.org>
SIMPLEQ_INIT(&sc->sc_pwrresdevs);
#endif /* NACPIPWRRES > 0 */
-
-#ifndef SMALL_KERNEL
- sc->sc_note = malloc(sizeof(struct klist), M_DEVBUF, M_NOWAIT | M_ZERO);
- if (sc->sc_note == NULL) {
- printf(": can't allocate memory\n");
- acpi_unmap(&handle);
- return;
- }
-#endif /* SMALL_KERNEL */
-
if (acpi_loadtables(sc, rsdp)) {
printf(": can't load tables\n");
acpi_unmap(&handle);
return (1);
acpi_evindex++;
- KNOTE(sc->sc_note, APM_EVENT_COMPOSE(type, acpi_evindex));
+ KNOTE(&sc->sc_note, APM_EVENT_COMPOSE(type, acpi_evindex));
return (0);
}
int s;
s = splbio();
- klist_remove_locked(sc->sc_note, kn);
+ klist_remove_locked(&sc->sc_note, kn);
splx(s);
}
kn->kn_hook = sc;
s = splbio();
- klist_insert_locked(sc->sc_note, kn);
+ klist_insert_locked(&sc->sc_note, kn);
splx(s);
return (0);
-/* $OpenBSD: acpivar.h,v 1.118 2022/02/08 17:25:12 deraadt Exp $ */
+/* $OpenBSD: acpivar.h,v 1.119 2022/02/10 07:39:20 visa Exp $ */
/*
* Copyright (c) 2005 Thorsten Lockert <tholo@sigmasoft.com>
*
#ifndef _ACPI_WAKECODE
+#include <sys/event.h>
#include <sys/timeout.h>
#include <sys/rwlock.h>
extern int acpi_hasprocfvs;
extern int acpi_haspci;
-struct klist;
struct acpiec_softc;
struct acpipwrres_softc;
*/
struct acpi_facs *sc_facs; /* Shared with firmware! */
- struct klist *sc_note;
+ struct klist sc_note;
struct acpi_reg_map sc_pmregs[ACPIREG_MAXREG];
bus_space_handle_t sc_ioh_pm1a_evt;