diff options
Diffstat (limited to 'sys')
-rw-r--r-- | sys/arch/amd64/include/apmvar.h | 3 | ||||
-rw-r--r-- | sys/arch/i386/include/apmvar.h | 3 | ||||
-rw-r--r-- | sys/dev/acpi/acpithinkpad.c | 7 |
3 files changed, 8 insertions, 5 deletions
diff --git a/sys/arch/amd64/include/apmvar.h b/sys/arch/amd64/include/apmvar.h index 13aa50eb6f6..7b502e334bd 100644 --- a/sys/arch/amd64/include/apmvar.h +++ b/sys/arch/amd64/include/apmvar.h @@ -1,5 +1,5 @@ /* XXX - DSR */ -/* $OpenBSD: apmvar.h,v 1.5 2012/07/08 18:02:45 guenther Exp $ */ +/* $OpenBSD: apmvar.h,v 1.6 2015/02/06 08:16:49 dcoppa Exp $ */ /* * Copyright (c) 1995 John T. Kohl @@ -173,6 +173,7 @@ #define APM_SYS_STANDBY_RESUME 0x000B #define APM_CAPABILITY_CHANGE 0x000C /* apm v1.2 */ /* 0x000d - 0x00ff Reserved system events */ +#define APM_USER_HIBERNATE_REQ 0x000D /* 0x0100 - 0x01ff Reserved device events */ /* 0x0200 - 0x02ff OEM-defined APM events */ /* 0x0300 - 0xffff Reserved */ diff --git a/sys/arch/i386/include/apmvar.h b/sys/arch/i386/include/apmvar.h index 522016ea777..41f1d617b93 100644 --- a/sys/arch/i386/include/apmvar.h +++ b/sys/arch/i386/include/apmvar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: apmvar.h,v 1.19 2012/07/08 18:02:45 guenther Exp $ */ +/* $OpenBSD: apmvar.h,v 1.20 2015/02/06 08:16:49 dcoppa Exp $ */ /* * Copyright (c) 1995 John T. Kohl @@ -172,6 +172,7 @@ #define APM_SYS_STANDBY_RESUME 0x000B #define APM_CAPABILITY_CHANGE 0x000C /* apm v1.2 */ /* 0x000d - 0x00ff Reserved system events */ +#define APM_USER_HIBERNATE_REQ 0x000D /* 0x0100 - 0x01ff Reserved device events */ /* 0x0200 - 0x02ff OEM-defined APM events */ /* 0x0300 - 0xffff Reserved */ diff --git a/sys/dev/acpi/acpithinkpad.c b/sys/dev/acpi/acpithinkpad.c index cf4d432e899..a00afb00429 100644 --- a/sys/dev/acpi/acpithinkpad.c +++ b/sys/dev/acpi/acpithinkpad.c @@ -1,4 +1,4 @@ -/* $OpenBSD: acpithinkpad.c,v 1.42 2014/12/13 05:29:50 deraadt Exp $ */ +/* $OpenBSD: acpithinkpad.c,v 1.43 2015/02/06 08:16:49 dcoppa Exp $ */ /* * Copyright (c) 2008 joshua stein <jcs@openbsd.org> * @@ -347,8 +347,9 @@ thinkpad_hotkey(struct aml_node *node, int notify_type, void *arg) break; case THINKPAD_BUTTON_HIBERNATE: #if defined(HIBERNATE) && !defined(SMALL_KERNEL) - acpi_addtask(sc->sc_acpi, acpi_sleep_task, - sc->sc_acpi, ACPI_STATE_S4); + if (acpi_record_event(sc->sc_acpi, APM_USER_HIBERNATE_REQ)) + acpi_addtask(sc->sc_acpi, acpi_sleep_task, + sc->sc_acpi, ACPI_STATE_S4); #endif handled = 1; break; |