From: matthew Date: Tue, 20 Jul 2010 04:04:00 +0000 (+0000) Subject: When we're preparing to go to sleep, only call bufq_restart() if other X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=12117ec7714268e9607642a7feacedbb02b68152;p=openbsd When we're preparing to go to sleep, only call bufq_restart() if other preparations failed. ok kettenis@, thib@, deraadt@ --- 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 * Copyright (c) 2005 Jordan Hargrave @@ -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); }