My previous commit introduced a spurious warning for the case where a
switch (i.e. lid) is set to have an action of NONE. This is not an invalid state, so silently return. This fixes the warning: "acpi: request to enter state S6 failed (err 22)" Approved by: re
This commit is contained in:
parent
257efcd242
commit
4db9e9bfd8
@ -2727,6 +2727,10 @@ acpi_system_eventhandler_sleep(void *arg, int state)
|
||||
|
||||
ACPI_FUNCTION_TRACE_U32((char *)(uintptr_t)__func__, state);
|
||||
|
||||
/* Check if button action is disabled. */
|
||||
if (state == ACPI_S_STATES_MAX + 1)
|
||||
return;
|
||||
|
||||
/* Request that the system prepare to enter the given suspend state. */
|
||||
ret = acpi_ReqSleepState((struct acpi_softc *)arg, state);
|
||||
if (ret != 0)
|
||||
|
Loading…
Reference in New Issue
Block a user