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 6ab2c3505520..a934950ff7a0 100644 --- a/drivers/acpi/osl.c +++ b/drivers/acpi/osl.c | |||
@@ -79,6 +79,8 @@ extern char line_buf[80]; | |||
79 | 79 | ||
80 | static int (*__acpi_os_prepare_sleep)(u8 sleep_state, u32 pm1a_ctrl, | 80 | static int (*__acpi_os_prepare_sleep)(u8 sleep_state, u32 pm1a_ctrl, |
81 | u32 pm1b_ctrl); | 81 | u32 pm1b_ctrl); |
82 | static int (*__acpi_os_prepare_extended_sleep)(u8 sleep_state, u32 val_a, | ||
83 | u32 val_b); | ||
82 | 84 | ||
83 | static acpi_osd_handler acpi_irq_handler; | 85 | static acpi_osd_handler acpi_irq_handler; |
84 | static void *acpi_irq_context; | 86 | static void *acpi_irq_context; |
@@ -1779,6 +1781,28 @@ void acpi_os_set_prepare_sleep(int (*func)(u8 sleep_state, | |||
1779 | __acpi_os_prepare_sleep = func; | 1781 | __acpi_os_prepare_sleep = func; |
1780 | } | 1782 | } |
1781 | 1783 | ||
1784 | acpi_status acpi_os_prepare_extended_sleep(u8 sleep_state, u32 val_a, | ||
1785 | u32 val_b) | ||
1786 | { | ||
1787 | int rc = 0; | ||
1788 | if (__acpi_os_prepare_extended_sleep) | ||
1789 | rc = __acpi_os_prepare_extended_sleep(sleep_state, | ||
1790 | val_a, val_b); | ||
1791 | if (rc < 0) | ||
1792 | return AE_ERROR; | ||
1793 | else if (rc > 0) | ||
1794 | return AE_CTRL_SKIP; | ||
1795 | |||
1796 | return AE_OK; | ||
1797 | } | ||
1798 | |||
1799 | void acpi_os_set_prepare_extended_sleep(int (*func)(u8 sleep_state, | ||
1800 | u32 val_a, u32 val_b)) | ||
1801 | { | ||
1802 | __acpi_os_prepare_extended_sleep = func; | ||
1803 | } | ||
1804 | |||
1805 | |||
1782 | void alloc_acpi_hp_work(acpi_handle handle, u32 type, void *context, | 1806 | void alloc_acpi_hp_work(acpi_handle handle, u32 type, void *context, |
1783 | void (*func)(struct work_struct *work)) | 1807 | void (*func)(struct work_struct *work)) |
1784 | { | 1808 | { |