Reject requests to start or ack a suspend sequence on platforms that do not

support suspend/resume, currently all except i386.

Tested by:	jkim
Approved by:	re
This commit is contained in:
njl 2007-09-13 01:37:17 +00:00
parent 4e0d648ec9
commit 94a43e7b47

View File

@ -2173,6 +2173,11 @@ acpi_ReqSleepState(struct acpi_softc *sc, int state)
return (ENXIO);
}
#if !defined(__i386__)
/* This platform does not support acpi suspend/resume. */
return (EOPNOTSUPP);
#endif
/* If a suspend request is already in progress, just return. */
ACPI_LOCK(acpi);
if (sc->acpi_next_sstate != 0) {
@ -2218,6 +2223,11 @@ acpi_AckSleepState(struct apm_clone_data *clone, int error)
struct acpi_softc *sc;
int ret, sleeping;
#if !defined(__i386__)
/* This platform does not support acpi suspend/resume. */
return (EOPNOTSUPP);
#endif
/* If no pending sleep state, return an error. */
ACPI_LOCK(acpi);
sc = clone->acpi_sc;