From edf6eb705e604c271075be04e4eab44112c5e58a Mon Sep 17 00:00:00 2001 From: Joerg Sonnenberger Date: Wed, 15 Sep 2004 16:46:19 +0000 Subject: [PATCH] timeout/untimeout ==> callout_* --- sys/dev/acpica5/acpi.c | 6 ++++-- sys/dev/acpica5/acpivar.h | 3 ++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/sys/dev/acpica5/acpi.c b/sys/dev/acpica5/acpi.c index c24c879ca0..b2c3c4f916 100644 --- a/sys/dev/acpica5/acpi.c +++ b/sys/dev/acpica5/acpi.c @@ -27,7 +27,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/dev/acpica/acpi.c,v 1.156 2004/06/05 07:25:58 njl Exp $ - * $DragonFly: src/sys/dev/acpica5/acpi.c,v 1.8 2004/08/02 19:51:07 dillon Exp $ + * $DragonFly: src/sys/dev/acpica5/acpi.c,v 1.9 2004/09/15 16:46:19 joerg Exp $ */ #include "opt_acpi.h" @@ -397,6 +397,7 @@ acpi_attach(device_t dev) sc = device_get_softc(dev); bzero(sc, sizeof(*sc)); sc->acpi_dev = dev; + callout_init(&sc->acpi_sleep_timer); #ifdef ACPI_DEBUGGER debugpoint = getenv("debug.acpi.debugger"); @@ -1777,7 +1778,8 @@ acpi_SetSleepState(struct acpi_softc *sc, int state) /* Disable a second sleep request for a short period */ if (sc->acpi_sleep_disabled) - timeout(acpi_sleep_enable, (caddr_t)sc, hz * ACPI_MINIMUM_AWAKETIME); + callout_reset(&sc->acpi_sleep_timer, hz * ACPI_MINIMUM_AWAKETIME, + acpi_sleep_enable, sc); return_ACPI_STATUS (status); } diff --git a/sys/dev/acpica5/acpivar.h b/sys/dev/acpica5/acpivar.h index 90ae5d6bdf..0c1c244a3d 100644 --- a/sys/dev/acpica5/acpivar.h +++ b/sys/dev/acpica5/acpivar.h @@ -26,7 +26,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/dev/acpica/acpivar.h,v 1.69 2004/05/28 07:15:55 njl Exp $ - * $DragonFly: src/sys/dev/acpica5/acpivar.h,v 1.4 2004/08/02 19:51:07 dillon Exp $ + * $DragonFly: src/sys/dev/acpica5/acpivar.h,v 1.5 2004/09/15 16:46:19 joerg Exp $ */ #include "bus_if.h" @@ -44,6 +44,7 @@ struct acpi_softc { device_t acpi_dev; dev_t acpi_dev_t; + struct callout acpi_sleep_timer; struct resource *acpi_irq; int acpi_irq_rid; void *acpi_irq_handle; -- 2.41.0