From: deraadt Date: Sat, 10 Aug 2024 23:28:17 +0000 (+0000) Subject: cleanup excessive calls to acpi_indicator at suspend time and resume time X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=122e27ec709becc903e52eb601da8157399e74fe;p=openbsd cleanup excessive calls to acpi_indicator at suspend time and resume time ok kettenis --- diff --git a/sys/dev/acpi/acpi.c b/sys/dev/acpi/acpi.c index 29f84dd0343..de66b0a45b7 100644 --- a/sys/dev/acpi/acpi.c +++ b/sys/dev/acpi/acpi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: acpi.c,v 1.436 2024/07/30 19:47:06 mglocker Exp $ */ +/* $OpenBSD: acpi.c,v 1.437 2024/08/10 23:28:17 deraadt Exp $ */ /* * Copyright (c) 2005 Thorsten Lockert * Copyright (c) 2005 Jordan Hargrave @@ -2591,8 +2591,6 @@ acpi_resume_pm(struct acpi_softc *sc, int fromstate) acpi_disable_allgpes(sc); acpi_enable_rungpes(sc); - acpi_indicator(sc, ACPI_SST_WAKING); - /* 2nd resume AML step: _WAK(fromstate) */ aml_node_setval(sc, sc->sc_wak, fromstate); diff --git a/sys/dev/acpi/acpi_x86.c b/sys/dev/acpi/acpi_x86.c index e08435d25c8..0262e2f69cb 100644 --- a/sys/dev/acpi/acpi_x86.c +++ b/sys/dev/acpi/acpi_x86.c @@ -1,4 +1,4 @@ -/* $OpenBSD: acpi_x86.c,v 1.25 2024/08/08 07:02:38 kettenis Exp $ */ +/* $OpenBSD: acpi_x86.c,v 1.26 2024/08/10 23:28:17 deraadt Exp $ */ /* * Copyright (c) 2005 Thorsten Lockert * Copyright (c) 2005 Jordan Hargrave @@ -123,6 +123,8 @@ gosleep(void *v) sc->sc_wakeup = 1; } + acpi_indicator(sc, ACPI_SST_WAKING); /* blink */ + if (sc->sc_pmc_resume) sc->sc_pmc_resume(sc->sc_pmc_cookie); @@ -143,7 +145,6 @@ sleep_resume(void *v) if (aml_node_setval(sc, sc->sc_tts, ACPI_STATE_S0) != 0) return (EINVAL); } - acpi_indicator(sc, ACPI_SST_WAKING); /* blink */ return 0; }