svn commit: r220844 - head/sys/i386/bios
Jung-uk Kim
jkim at FreeBSD.org
Tue Apr 19 16:30:17 UTC 2011
Author: jkim
Date: Tue Apr 19 16:30:17 2011
New Revision: 220844
URL: http://svn.freebsd.org/changeset/base/220844
Log:
Do not invoke resume event handlers if suspend was successful.
Pointy hat to: jkim
Modified:
head/sys/i386/bios/apm.c
Modified: head/sys/i386/bios/apm.c
==============================================================================
--- head/sys/i386/bios/apm.c Tue Apr 19 16:29:56 2011 (r220843)
+++ head/sys/i386/bios/apm.c Tue Apr 19 16:30:17 2011 (r220844)
@@ -499,11 +499,13 @@ apm_do_suspend(void)
if (apm_suspend_system(PMST_SUSPEND) == 0) {
sc->suspending = 1;
apm_processevent();
- } else {
- /* Failure, 'resume' the system again */
- apm_execute_hook(hook[APM_HOOK_RESUME]);
- DEVICE_RESUME(root_bus);
+ mtx_unlock(&Giant);
+ return;
}
+
+ /* Failure, 'resume' the system again */
+ apm_execute_hook(hook[APM_HOOK_RESUME]);
+ DEVICE_RESUME(root_bus);
backout:
mtx_unlock(&Giant);
EVENTHANDLER_INVOKE(power_resume);
More information about the svn-src-head
mailing list