diff options
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 9fddb55764f3..ba14fb93c929 100644 --- a/drivers/acpi/osl.c +++ b/drivers/acpi/osl.c | |||
@@ -77,6 +77,9 @@ EXPORT_SYMBOL(acpi_in_debugger); | |||
77 | extern char line_buf[80]; | 77 | extern char line_buf[80]; |
78 | #endif /*ENABLE_DEBUGGER */ | 78 | #endif /*ENABLE_DEBUGGER */ |
79 | 79 | ||
80 | static int (*__acpi_os_prepare_sleep)(u8 sleep_state, u32 pm1a_ctrl, | ||
81 | u32 pm1b_ctrl); | ||
82 | |||
80 | static acpi_osd_handler acpi_irq_handler; | 83 | static acpi_osd_handler acpi_irq_handler; |
81 | static void *acpi_irq_context; | 84 | static void *acpi_irq_context; |
82 | static struct workqueue_struct *kacpid_wq; | 85 | static struct workqueue_struct *kacpid_wq; |
@@ -1569,3 +1572,24 @@ acpi_status acpi_os_terminate(void) | |||
1569 | 1572 | ||
1570 | return AE_OK; | 1573 | return AE_OK; |
1571 | } | 1574 | } |
1575 | |||
1576 | acpi_status acpi_os_prepare_sleep(u8 sleep_state, u32 pm1a_control, | ||
1577 | u32 pm1b_control) | ||
1578 | { | ||
1579 | int rc = 0; | ||
1580 | if (__acpi_os_prepare_sleep) | ||
1581 | rc = __acpi_os_prepare_sleep(sleep_state, | ||
1582 | pm1a_control, pm1b_control); | ||
1583 | if (rc < 0) | ||
1584 | return AE_ERROR; | ||
1585 | else if (rc > 0) | ||
1586 | return AE_CTRL_SKIP; | ||
1587 | |||
1588 | return AE_OK; | ||
1589 | } | ||
1590 | |||
1591 | void acpi_os_set_prepare_sleep(int (*func)(u8 sleep_state, | ||
1592 | u32 pm1a_ctrl, u32 pm1b_ctrl)) | ||
1593 | { | ||
1594 | __acpi_os_prepare_sleep = func; | ||
1595 | } | ||