Ignore the power button press event for resuming rather than starting
shutdown. MFC after: 2 days
This commit is contained in:
parent
73776eede3
commit
b4d1c5d043
@ -2515,6 +2515,11 @@ acpi_ReqSleepState(struct acpi_softc *sc, int state)
|
||||
if (!acpi_sleep_states[state])
|
||||
return (EOPNOTSUPP);
|
||||
|
||||
/* If a suspend request is already in progress, just return. */
|
||||
if (sc->acpi_next_sstate != 0) {
|
||||
return (0);
|
||||
}
|
||||
|
||||
/* Wait until sleep is enabled. */
|
||||
while (sc->acpi_sleep_disabled) {
|
||||
AcpiOsSleep(1000);
|
||||
@ -2522,11 +2527,6 @@ acpi_ReqSleepState(struct acpi_softc *sc, int state)
|
||||
|
||||
ACPI_LOCK(acpi);
|
||||
|
||||
/* If a suspend request is already in progress, just return. */
|
||||
if (sc->acpi_next_sstate != 0) {
|
||||
ACPI_UNLOCK(acpi);
|
||||
return (0);
|
||||
}
|
||||
sc->acpi_next_sstate = state;
|
||||
|
||||
/* S5 (soft-off) should be entered directly with no waiting. */
|
||||
|
Loading…
Reference in New Issue
Block a user