diff options
Diffstat (limited to 'drivers/acpi/events/evxface.c')
| -rw-r--r-- | drivers/acpi/events/evxface.c | 49 |
1 files changed, 22 insertions, 27 deletions
diff --git a/drivers/acpi/events/evxface.c b/drivers/acpi/events/evxface.c index b38b39dde543..76c34a66e0e0 100644 --- a/drivers/acpi/events/evxface.c +++ b/drivers/acpi/events/evxface.c | |||
| @@ -41,8 +41,6 @@ | |||
| 41 | * POSSIBILITY OF SUCH DAMAGES. | 41 | * POSSIBILITY OF SUCH DAMAGES. |
| 42 | */ | 42 | */ |
| 43 | 43 | ||
| 44 | #include <linux/module.h> | ||
| 45 | |||
| 46 | #include <acpi/acpi.h> | 44 | #include <acpi/acpi.h> |
| 47 | #include <acpi/acnamesp.h> | 45 | #include <acpi/acnamesp.h> |
| 48 | #include <acpi/acevents.h> | 46 | #include <acpi/acevents.h> |
| @@ -68,7 +66,7 @@ acpi_status acpi_install_exception_handler(acpi_exception_handler handler) | |||
| 68 | { | 66 | { |
| 69 | acpi_status status; | 67 | acpi_status status; |
| 70 | 68 | ||
| 71 | ACPI_FUNCTION_TRACE("acpi_install_exception_handler"); | 69 | ACPI_FUNCTION_TRACE(acpi_install_exception_handler); |
| 72 | 70 | ||
| 73 | status = acpi_ut_acquire_mutex(ACPI_MTX_EVENTS); | 71 | status = acpi_ut_acquire_mutex(ACPI_MTX_EVENTS); |
| 74 | if (ACPI_FAILURE(status)) { | 72 | if (ACPI_FAILURE(status)) { |
| @@ -90,6 +88,8 @@ acpi_status acpi_install_exception_handler(acpi_exception_handler handler) | |||
| 90 | (void)acpi_ut_release_mutex(ACPI_MTX_EVENTS); | 88 | (void)acpi_ut_release_mutex(ACPI_MTX_EVENTS); |
| 91 | return_ACPI_STATUS(status); | 89 | return_ACPI_STATUS(status); |
| 92 | } | 90 | } |
| 91 | |||
| 92 | ACPI_EXPORT_SYMBOL(acpi_install_exception_handler) | ||
| 93 | #endif /* ACPI_FUTURE_USAGE */ | 93 | #endif /* ACPI_FUTURE_USAGE */ |
| 94 | 94 | ||
| 95 | /******************************************************************************* | 95 | /******************************************************************************* |
| @@ -107,14 +107,13 @@ acpi_status acpi_install_exception_handler(acpi_exception_handler handler) | |||
| 107 | * event. | 107 | * event. |
| 108 | * | 108 | * |
| 109 | ******************************************************************************/ | 109 | ******************************************************************************/ |
| 110 | |||
| 111 | acpi_status | 110 | acpi_status |
| 112 | acpi_install_fixed_event_handler(u32 event, | 111 | acpi_install_fixed_event_handler(u32 event, |
| 113 | acpi_event_handler handler, void *context) | 112 | acpi_event_handler handler, void *context) |
| 114 | { | 113 | { |
| 115 | acpi_status status; | 114 | acpi_status status; |
| 116 | 115 | ||
| 117 | ACPI_FUNCTION_TRACE("acpi_install_fixed_event_handler"); | 116 | ACPI_FUNCTION_TRACE(acpi_install_fixed_event_handler); |
| 118 | 117 | ||
| 119 | /* Parameter validation */ | 118 | /* Parameter validation */ |
| 120 | 119 | ||
| @@ -161,7 +160,7 @@ acpi_install_fixed_event_handler(u32 event, | |||
| 161 | return_ACPI_STATUS(status); | 160 | return_ACPI_STATUS(status); |
| 162 | } | 161 | } |
| 163 | 162 | ||
| 164 | EXPORT_SYMBOL(acpi_install_fixed_event_handler); | 163 | ACPI_EXPORT_SYMBOL(acpi_install_fixed_event_handler) |
| 165 | 164 | ||
| 166 | /******************************************************************************* | 165 | /******************************************************************************* |
| 167 | * | 166 | * |
| @@ -175,13 +174,12 @@ EXPORT_SYMBOL(acpi_install_fixed_event_handler); | |||
| 175 | * DESCRIPTION: Disables the event and unregisters the event handler. | 174 | * DESCRIPTION: Disables the event and unregisters the event handler. |
| 176 | * | 175 | * |
| 177 | ******************************************************************************/ | 176 | ******************************************************************************/ |
| 178 | |||
| 179 | acpi_status | 177 | acpi_status |
| 180 | acpi_remove_fixed_event_handler(u32 event, acpi_event_handler handler) | 178 | acpi_remove_fixed_event_handler(u32 event, acpi_event_handler handler) |
| 181 | { | 179 | { |
| 182 | acpi_status status = AE_OK; | 180 | acpi_status status = AE_OK; |
| 183 | 181 | ||
| 184 | ACPI_FUNCTION_TRACE("acpi_remove_fixed_event_handler"); | 182 | ACPI_FUNCTION_TRACE(acpi_remove_fixed_event_handler); |
| 185 | 183 | ||
| 186 | /* Parameter validation */ | 184 | /* Parameter validation */ |
| 187 | 185 | ||
| @@ -216,7 +214,7 @@ acpi_remove_fixed_event_handler(u32 event, acpi_event_handler handler) | |||
| 216 | return_ACPI_STATUS(status); | 214 | return_ACPI_STATUS(status); |
| 217 | } | 215 | } |
| 218 | 216 | ||
| 219 | EXPORT_SYMBOL(acpi_remove_fixed_event_handler); | 217 | ACPI_EXPORT_SYMBOL(acpi_remove_fixed_event_handler) |
| 220 | 218 | ||
| 221 | /******************************************************************************* | 219 | /******************************************************************************* |
| 222 | * | 220 | * |
| @@ -235,7 +233,6 @@ EXPORT_SYMBOL(acpi_remove_fixed_event_handler); | |||
| 235 | * DESCRIPTION: Install a handler for notifies on an ACPI device | 233 | * DESCRIPTION: Install a handler for notifies on an ACPI device |
| 236 | * | 234 | * |
| 237 | ******************************************************************************/ | 235 | ******************************************************************************/ |
| 238 | |||
| 239 | acpi_status | 236 | acpi_status |
| 240 | acpi_install_notify_handler(acpi_handle device, | 237 | acpi_install_notify_handler(acpi_handle device, |
| 241 | u32 handler_type, | 238 | u32 handler_type, |
| @@ -246,7 +243,7 @@ acpi_install_notify_handler(acpi_handle device, | |||
| 246 | struct acpi_namespace_node *node; | 243 | struct acpi_namespace_node *node; |
| 247 | acpi_status status; | 244 | acpi_status status; |
| 248 | 245 | ||
| 249 | ACPI_FUNCTION_TRACE("acpi_install_notify_handler"); | 246 | ACPI_FUNCTION_TRACE(acpi_install_notify_handler); |
| 250 | 247 | ||
| 251 | /* Parameter validation */ | 248 | /* Parameter validation */ |
| 252 | 249 | ||
| @@ -275,6 +272,7 @@ acpi_install_notify_handler(acpi_handle device, | |||
| 275 | * only one <external> global handler can be regsitered (per notify type). | 272 | * only one <external> global handler can be regsitered (per notify type). |
| 276 | */ | 273 | */ |
| 277 | if (device == ACPI_ROOT_OBJECT) { | 274 | if (device == ACPI_ROOT_OBJECT) { |
| 275 | |||
| 278 | /* Make sure the handler is not already installed */ | 276 | /* Make sure the handler is not already installed */ |
| 279 | 277 | ||
| 280 | if (((handler_type & ACPI_SYSTEM_NOTIFY) && | 278 | if (((handler_type & ACPI_SYSTEM_NOTIFY) && |
| @@ -317,6 +315,7 @@ acpi_install_notify_handler(acpi_handle device, | |||
| 317 | 315 | ||
| 318 | obj_desc = acpi_ns_get_attached_object(node); | 316 | obj_desc = acpi_ns_get_attached_object(node); |
| 319 | if (obj_desc) { | 317 | if (obj_desc) { |
| 318 | |||
| 320 | /* Object exists - make sure there's no handler */ | 319 | /* Object exists - make sure there's no handler */ |
| 321 | 320 | ||
| 322 | if (((handler_type & ACPI_SYSTEM_NOTIFY) && | 321 | if (((handler_type & ACPI_SYSTEM_NOTIFY) && |
| @@ -370,6 +369,7 @@ acpi_install_notify_handler(acpi_handle device, | |||
| 370 | } | 369 | } |
| 371 | 370 | ||
| 372 | if (handler_type == ACPI_ALL_NOTIFY) { | 371 | if (handler_type == ACPI_ALL_NOTIFY) { |
| 372 | |||
| 373 | /* Extra ref if installed in both */ | 373 | /* Extra ref if installed in both */ |
| 374 | 374 | ||
| 375 | acpi_ut_add_reference(notify_obj); | 375 | acpi_ut_add_reference(notify_obj); |
| @@ -381,7 +381,7 @@ acpi_install_notify_handler(acpi_handle device, | |||
| 381 | return_ACPI_STATUS(status); | 381 | return_ACPI_STATUS(status); |
| 382 | } | 382 | } |
| 383 | 383 | ||
| 384 | EXPORT_SYMBOL(acpi_install_notify_handler); | 384 | ACPI_EXPORT_SYMBOL(acpi_install_notify_handler) |
| 385 | 385 | ||
| 386 | /******************************************************************************* | 386 | /******************************************************************************* |
| 387 | * | 387 | * |
| @@ -399,7 +399,6 @@ EXPORT_SYMBOL(acpi_install_notify_handler); | |||
| 399 | * DESCRIPTION: Remove a handler for notifies on an ACPI device | 399 | * DESCRIPTION: Remove a handler for notifies on an ACPI device |
| 400 | * | 400 | * |
| 401 | ******************************************************************************/ | 401 | ******************************************************************************/ |
| 402 | |||
| 403 | acpi_status | 402 | acpi_status |
| 404 | acpi_remove_notify_handler(acpi_handle device, | 403 | acpi_remove_notify_handler(acpi_handle device, |
| 405 | u32 handler_type, acpi_notify_handler handler) | 404 | u32 handler_type, acpi_notify_handler handler) |
| @@ -409,7 +408,7 @@ acpi_remove_notify_handler(acpi_handle device, | |||
| 409 | struct acpi_namespace_node *node; | 408 | struct acpi_namespace_node *node; |
| 410 | acpi_status status; | 409 | acpi_status status; |
| 411 | 410 | ||
| 412 | ACPI_FUNCTION_TRACE("acpi_remove_notify_handler"); | 411 | ACPI_FUNCTION_TRACE(acpi_remove_notify_handler); |
| 413 | 412 | ||
| 414 | /* Parameter validation */ | 413 | /* Parameter validation */ |
| 415 | 414 | ||
| @@ -535,7 +534,7 @@ acpi_remove_notify_handler(acpi_handle device, | |||
| 535 | return_ACPI_STATUS(status); | 534 | return_ACPI_STATUS(status); |
| 536 | } | 535 | } |
| 537 | 536 | ||
| 538 | EXPORT_SYMBOL(acpi_remove_notify_handler); | 537 | ACPI_EXPORT_SYMBOL(acpi_remove_notify_handler) |
| 539 | 538 | ||
| 540 | /******************************************************************************* | 539 | /******************************************************************************* |
| 541 | * | 540 | * |
| @@ -554,7 +553,6 @@ EXPORT_SYMBOL(acpi_remove_notify_handler); | |||
| 554 | * DESCRIPTION: Install a handler for a General Purpose Event. | 553 | * DESCRIPTION: Install a handler for a General Purpose Event. |
| 555 | * | 554 | * |
| 556 | ******************************************************************************/ | 555 | ******************************************************************************/ |
| 557 | |||
| 558 | acpi_status | 556 | acpi_status |
| 559 | acpi_install_gpe_handler(acpi_handle gpe_device, | 557 | acpi_install_gpe_handler(acpi_handle gpe_device, |
| 560 | u32 gpe_number, | 558 | u32 gpe_number, |
| @@ -565,7 +563,7 @@ acpi_install_gpe_handler(acpi_handle gpe_device, | |||
| 565 | acpi_status status; | 563 | acpi_status status; |
| 566 | acpi_cpu_flags flags; | 564 | acpi_cpu_flags flags; |
| 567 | 565 | ||
| 568 | ACPI_FUNCTION_TRACE("acpi_install_gpe_handler"); | 566 | ACPI_FUNCTION_TRACE(acpi_install_gpe_handler); |
| 569 | 567 | ||
| 570 | /* Parameter validation */ | 568 | /* Parameter validation */ |
| 571 | 569 | ||
| @@ -596,7 +594,7 @@ acpi_install_gpe_handler(acpi_handle gpe_device, | |||
| 596 | 594 | ||
| 597 | /* Allocate and init handler object */ | 595 | /* Allocate and init handler object */ |
| 598 | 596 | ||
| 599 | handler = ACPI_MEM_CALLOCATE(sizeof(struct acpi_handler_info)); | 597 | handler = ACPI_ALLOCATE_ZEROED(sizeof(struct acpi_handler_info)); |
| 600 | if (!handler) { | 598 | if (!handler) { |
| 601 | status = AE_NO_MEMORY; | 599 | status = AE_NO_MEMORY; |
| 602 | goto unlock_and_exit; | 600 | goto unlock_and_exit; |
| @@ -630,7 +628,7 @@ acpi_install_gpe_handler(acpi_handle gpe_device, | |||
| 630 | return_ACPI_STATUS(status); | 628 | return_ACPI_STATUS(status); |
| 631 | } | 629 | } |
| 632 | 630 | ||
| 633 | EXPORT_SYMBOL(acpi_install_gpe_handler); | 631 | ACPI_EXPORT_SYMBOL(acpi_install_gpe_handler) |
| 634 | 632 | ||
| 635 | /******************************************************************************* | 633 | /******************************************************************************* |
| 636 | * | 634 | * |
| @@ -646,7 +644,6 @@ EXPORT_SYMBOL(acpi_install_gpe_handler); | |||
| 646 | * DESCRIPTION: Remove a handler for a General Purpose acpi_event. | 644 | * DESCRIPTION: Remove a handler for a General Purpose acpi_event. |
| 647 | * | 645 | * |
| 648 | ******************************************************************************/ | 646 | ******************************************************************************/ |
| 649 | |||
| 650 | acpi_status | 647 | acpi_status |
| 651 | acpi_remove_gpe_handler(acpi_handle gpe_device, | 648 | acpi_remove_gpe_handler(acpi_handle gpe_device, |
| 652 | u32 gpe_number, acpi_event_handler address) | 649 | u32 gpe_number, acpi_event_handler address) |
| @@ -656,7 +653,7 @@ acpi_remove_gpe_handler(acpi_handle gpe_device, | |||
| 656 | acpi_status status; | 653 | acpi_status status; |
| 657 | acpi_cpu_flags flags; | 654 | acpi_cpu_flags flags; |
| 658 | 655 | ||
| 659 | ACPI_FUNCTION_TRACE("acpi_remove_gpe_handler"); | 656 | ACPI_FUNCTION_TRACE(acpi_remove_gpe_handler); |
| 660 | 657 | ||
| 661 | /* Parameter validation */ | 658 | /* Parameter validation */ |
| 662 | 659 | ||
| @@ -724,14 +721,14 @@ acpi_remove_gpe_handler(acpi_handle gpe_device, | |||
| 724 | 721 | ||
| 725 | /* Now we can free the handler object */ | 722 | /* Now we can free the handler object */ |
| 726 | 723 | ||
| 727 | ACPI_MEM_FREE(handler); | 724 | ACPI_FREE(handler); |
| 728 | 725 | ||
| 729 | unlock_and_exit: | 726 | unlock_and_exit: |
| 730 | (void)acpi_ut_release_mutex(ACPI_MTX_EVENTS); | 727 | (void)acpi_ut_release_mutex(ACPI_MTX_EVENTS); |
| 731 | return_ACPI_STATUS(status); | 728 | return_ACPI_STATUS(status); |
| 732 | } | 729 | } |
| 733 | 730 | ||
| 734 | EXPORT_SYMBOL(acpi_remove_gpe_handler); | 731 | ACPI_EXPORT_SYMBOL(acpi_remove_gpe_handler) |
| 735 | 732 | ||
| 736 | /******************************************************************************* | 733 | /******************************************************************************* |
| 737 | * | 734 | * |
| @@ -746,7 +743,6 @@ EXPORT_SYMBOL(acpi_remove_gpe_handler); | |||
| 746 | * DESCRIPTION: Acquire the ACPI Global Lock | 743 | * DESCRIPTION: Acquire the ACPI Global Lock |
| 747 | * | 744 | * |
| 748 | ******************************************************************************/ | 745 | ******************************************************************************/ |
| 749 | |||
| 750 | acpi_status acpi_acquire_global_lock(u16 timeout, u32 * handle) | 746 | acpi_status acpi_acquire_global_lock(u16 timeout, u32 * handle) |
| 751 | { | 747 | { |
| 752 | acpi_status status; | 748 | acpi_status status; |
| @@ -771,7 +767,7 @@ acpi_status acpi_acquire_global_lock(u16 timeout, u32 * handle) | |||
| 771 | return (status); | 767 | return (status); |
| 772 | } | 768 | } |
| 773 | 769 | ||
| 774 | EXPORT_SYMBOL(acpi_acquire_global_lock); | 770 | ACPI_EXPORT_SYMBOL(acpi_acquire_global_lock) |
| 775 | 771 | ||
| 776 | /******************************************************************************* | 772 | /******************************************************************************* |
| 777 | * | 773 | * |
| @@ -784,7 +780,6 @@ EXPORT_SYMBOL(acpi_acquire_global_lock); | |||
| 784 | * DESCRIPTION: Release the ACPI Global Lock. The handle must be valid. | 780 | * DESCRIPTION: Release the ACPI Global Lock. The handle must be valid. |
| 785 | * | 781 | * |
| 786 | ******************************************************************************/ | 782 | ******************************************************************************/ |
| 787 | |||
| 788 | acpi_status acpi_release_global_lock(u32 handle) | 783 | acpi_status acpi_release_global_lock(u32 handle) |
| 789 | { | 784 | { |
| 790 | acpi_status status; | 785 | acpi_status status; |
| @@ -797,4 +792,4 @@ acpi_status acpi_release_global_lock(u32 handle) | |||
| 797 | return (status); | 792 | return (status); |
| 798 | } | 793 | } |
| 799 | 794 | ||
| 800 | EXPORT_SYMBOL(acpi_release_global_lock); | 795 | ACPI_EXPORT_SYMBOL(acpi_release_global_lock) |
