diff options
author | Len Brown <len.brown@intel.com> | 2012-03-22 09:31:09 +0400 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2012-03-22 09:31:09 +0400 |
commit | e840dfe334b4791af07aadee1b2cf3c7c7363581 (patch) | |
tree | b0f8336f578cb6d3e39399f6714b8ec811536225 /drivers/acpi/osl.c | |
parent | c16fa4f2ad19908a47c63d8fa436a1178438c7e7 (diff) | |
parent | a1f37788a6d8c037e7d92fe4a0fe9ec0d713b21e (diff) | |
download | linux-e840dfe334b4791af07aadee1b2cf3c7c7363581.tar.xz |
Merge branch 'stable/for-x86-for-3.4' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen into tboot
Diffstat (limited to 'drivers/acpi/osl.c')
-rw-r--r-- | drivers/acpi/osl.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/drivers/acpi/osl.c b/drivers/acpi/osl.c index 412a1e04a922..17516ad59937 100644 --- a/drivers/acpi/osl.c +++ b/drivers/acpi/osl.c @@ -77,6 +77,9 @@ EXPORT_SYMBOL(acpi_in_debugger); extern char line_buf[80]; #endif /*ENABLE_DEBUGGER */ +static int (*__acpi_os_prepare_sleep)(u8 sleep_state, u32 pm1a_ctrl, + u32 pm1b_ctrl); + static acpi_osd_handler acpi_irq_handler; static void *acpi_irq_context; static struct workqueue_struct *kacpid_wq; @@ -1641,3 +1644,24 @@ acpi_status acpi_os_terminate(void) return AE_OK; } + +acpi_status acpi_os_prepare_sleep(u8 sleep_state, u32 pm1a_control, + u32 pm1b_control) +{ + int rc = 0; + if (__acpi_os_prepare_sleep) + rc = __acpi_os_prepare_sleep(sleep_state, + pm1a_control, pm1b_control); + if (rc < 0) + return AE_ERROR; + else if (rc > 0) + return AE_CTRL_SKIP; + + return AE_OK; +} + +void acpi_os_set_prepare_sleep(int (*func)(u8 sleep_state, + u32 pm1a_ctrl, u32 pm1b_ctrl)) +{ + __acpi_os_prepare_sleep = func; +} |