summaryrefslogtreecommitdiff
path: root/sys/dev/acpi
diff options
context:
space:
mode:
authorMatthew Dempsky <matthew@cvs.openbsd.org>2010-07-20 04:04:01 +0000
committerMatthew Dempsky <matthew@cvs.openbsd.org>2010-07-20 04:04:01 +0000
commit7ceef84b0caef3c1933f7ee8a63ffc66867862a0 (patch)
tree1272a98b6ff4cf77f70134a6807bd22537909401 /sys/dev/acpi
parent56a5dd7249f19ec96844bbc5be0ed4ca96dab26b (diff)
When we're preparing to go to sleep, only call bufq_restart() if other
preparations failed. ok kettenis@, thib@, deraadt@
Diffstat (limited to 'sys/dev/acpi')
-rw-r--r--sys/dev/acpi/acpi.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/dev/acpi/acpi.c b/sys/dev/acpi/acpi.c
index fba9d4bc069..92481a2136f 100644
--- a/sys/dev/acpi/acpi.c
+++ b/sys/dev/acpi/acpi.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: acpi.c,v 1.180 2010/07/19 16:58:12 deraadt Exp $ */
+/* $OpenBSD: acpi.c,v 1.181 2010/07/20 04:04:00 matthew Exp $ */
/*
* Copyright (c) 2005 Thorsten Lockert <tholo@sigmasoft.com>
* Copyright (c) 2005 Jordan Hargrave <jordan@openbsd.org>
@@ -2272,12 +2272,14 @@ acpi_prepare_sleep_state(struct acpi_softc *sc, int state)
acpi_susp_resume_gpewalk(sc, state, 1);
fail:
- bufq_restart();
+ if (error) {
+ bufq_restart();
#if NWSDISPLAY > 0
- if (error)
wsdisplay_resume();
#endif /* NWSDISPLAY > 0 */
+ }
+
return (error);
}