aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/osl.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/acpi/osl.c')
-rw-r--r--drivers/acpi/osl.c24
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);
77extern char line_buf[80]; 77extern char line_buf[80];
78#endif /*ENABLE_DEBUGGER */ 78#endif /*ENABLE_DEBUGGER */
79 79
80static int (*__acpi_os_prepare_sleep)(u8 sleep_state, u32 pm1a_ctrl,
81 u32 pm1b_ctrl);
82
80static acpi_osd_handler acpi_irq_handler; 83static acpi_osd_handler acpi_irq_handler;
81static void *acpi_irq_context; 84static void *acpi_irq_context;
82static struct workqueue_struct *kacpid_wq; 85static struct workqueue_struct *kacpid_wq;
@@ -1641,3 +1644,24 @@ acpi_status acpi_os_terminate(void)
1641 1644
1642 return AE_OK; 1645 return AE_OK;
1643} 1646}
1647
1648acpi_status acpi_os_prepare_sleep(u8 sleep_state, u32 pm1a_control,
1649 u32 pm1b_control)
1650{
1651 int rc = 0;
1652 if (__acpi_os_prepare_sleep)
1653 rc = __acpi_os_prepare_sleep(sleep_state,
1654 pm1a_control, pm1b_control);
1655 if (rc < 0)
1656 return AE_ERROR;
1657 else if (rc > 0)
1658 return AE_CTRL_SKIP;
1659
1660 return AE_OK;
1661}
1662
1663void acpi_os_set_prepare_sleep(int (*func)(u8 sleep_state,
1664 u32 pm1a_ctrl, u32 pm1b_ctrl))
1665{
1666 __acpi_os_prepare_sleep = func;
1667}