diff options
Diffstat (limited to 'drivers/acpi/events/evgpe.c')
-rw-r--r-- | drivers/acpi/events/evgpe.c | 38 |
1 files changed, 22 insertions, 16 deletions
diff --git a/drivers/acpi/events/evgpe.c b/drivers/acpi/events/evgpe.c index b2f232df13d8..353b907edbfa 100644 --- a/drivers/acpi/events/evgpe.c +++ b/drivers/acpi/events/evgpe.c | |||
@@ -5,7 +5,7 @@ | |||
5 | *****************************************************************************/ | 5 | *****************************************************************************/ |
6 | 6 | ||
7 | /* | 7 | /* |
8 | * Copyright (C) 2000 - 2005, R. Byron Moore | 8 | * Copyright (C) 2000 - 2006, R. Byron Moore |
9 | * All rights reserved. | 9 | * All rights reserved. |
10 | * | 10 | * |
11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without |
@@ -372,14 +372,14 @@ struct acpi_gpe_event_info *acpi_ev_get_gpe_event_info(acpi_handle gpe_device, | |||
372 | 372 | ||
373 | u32 acpi_ev_gpe_detect(struct acpi_gpe_xrupt_info * gpe_xrupt_list) | 373 | u32 acpi_ev_gpe_detect(struct acpi_gpe_xrupt_info * gpe_xrupt_list) |
374 | { | 374 | { |
375 | acpi_status status; | ||
376 | struct acpi_gpe_block_info *gpe_block; | ||
377 | struct acpi_gpe_register_info *gpe_register_info; | ||
375 | u32 int_status = ACPI_INTERRUPT_NOT_HANDLED; | 378 | u32 int_status = ACPI_INTERRUPT_NOT_HANDLED; |
376 | u8 enabled_status_byte; | 379 | u8 enabled_status_byte; |
377 | struct acpi_gpe_register_info *gpe_register_info; | ||
378 | u32 status_reg; | 380 | u32 status_reg; |
379 | u32 enable_reg; | 381 | u32 enable_reg; |
380 | u32 flags; | 382 | acpi_native_uint flags; |
381 | acpi_status status; | ||
382 | struct acpi_gpe_block_info *gpe_block; | ||
383 | acpi_native_uint i; | 383 | acpi_native_uint i; |
384 | acpi_native_uint j; | 384 | acpi_native_uint j; |
385 | 385 | ||
@@ -599,8 +599,10 @@ acpi_ev_gpe_dispatch(struct acpi_gpe_event_info *gpe_event_info, u32 gpe_number) | |||
599 | ACPI_GPE_EDGE_TRIGGERED) { | 599 | ACPI_GPE_EDGE_TRIGGERED) { |
600 | status = acpi_hw_clear_gpe(gpe_event_info); | 600 | status = acpi_hw_clear_gpe(gpe_event_info); |
601 | if (ACPI_FAILURE(status)) { | 601 | if (ACPI_FAILURE(status)) { |
602 | ACPI_REPORT_ERROR(("acpi_ev_gpe_dispatch: %s, Unable to clear GPE[%2X]\n", acpi_format_exception(status), gpe_number)); | 602 | ACPI_REPORT_ERROR(("%s, Unable to clear GPE[%2X]\n", |
603 | return_VALUE(ACPI_INTERRUPT_NOT_HANDLED); | 603 | acpi_format_exception(status), |
604 | gpe_number)); | ||
605 | return_UINT32(ACPI_INTERRUPT_NOT_HANDLED); | ||
604 | } | 606 | } |
605 | } | 607 | } |
606 | 608 | ||
@@ -637,8 +639,8 @@ acpi_ev_gpe_dispatch(struct acpi_gpe_event_info *gpe_event_info, u32 gpe_number) | |||
637 | ACPI_GPE_LEVEL_TRIGGERED) { | 639 | ACPI_GPE_LEVEL_TRIGGERED) { |
638 | status = acpi_hw_clear_gpe(gpe_event_info); | 640 | status = acpi_hw_clear_gpe(gpe_event_info); |
639 | if (ACPI_FAILURE(status)) { | 641 | if (ACPI_FAILURE(status)) { |
640 | ACPI_REPORT_ERROR(("acpi_ev_gpe_dispatch: %s, Unable to clear GPE[%2X]\n", acpi_format_exception(status), gpe_number)); | 642 | ACPI_REPORT_ERROR(("%s, Unable to clear GPE[%2X]\n", acpi_format_exception(status), gpe_number)); |
641 | return_VALUE(ACPI_INTERRUPT_NOT_HANDLED); | 643 | return_UINT32(ACPI_INTERRUPT_NOT_HANDLED); |
642 | } | 644 | } |
643 | } | 645 | } |
644 | break; | 646 | break; |
@@ -651,8 +653,10 @@ acpi_ev_gpe_dispatch(struct acpi_gpe_event_info *gpe_event_info, u32 gpe_number) | |||
651 | */ | 653 | */ |
652 | status = acpi_ev_disable_gpe(gpe_event_info); | 654 | status = acpi_ev_disable_gpe(gpe_event_info); |
653 | if (ACPI_FAILURE(status)) { | 655 | if (ACPI_FAILURE(status)) { |
654 | ACPI_REPORT_ERROR(("acpi_ev_gpe_dispatch: %s, Unable to disable GPE[%2X]\n", acpi_format_exception(status), gpe_number)); | 656 | ACPI_REPORT_ERROR(("%s, Unable to disable GPE[%2X]\n", |
655 | return_VALUE(ACPI_INTERRUPT_NOT_HANDLED); | 657 | acpi_format_exception(status), |
658 | gpe_number)); | ||
659 | return_UINT32(ACPI_INTERRUPT_NOT_HANDLED); | ||
656 | } | 660 | } |
657 | 661 | ||
658 | /* | 662 | /* |
@@ -663,7 +667,7 @@ acpi_ev_gpe_dispatch(struct acpi_gpe_event_info *gpe_event_info, u32 gpe_number) | |||
663 | acpi_ev_asynch_execute_gpe_method, | 667 | acpi_ev_asynch_execute_gpe_method, |
664 | gpe_event_info); | 668 | gpe_event_info); |
665 | if (ACPI_FAILURE(status)) { | 669 | if (ACPI_FAILURE(status)) { |
666 | ACPI_REPORT_ERROR(("acpi_ev_gpe_dispatch: %s, Unable to queue handler for GPE[%2X] - event disabled\n", acpi_format_exception(status), gpe_number)); | 670 | ACPI_REPORT_ERROR(("%s, Unable to queue handler for GPE[%2X] - event disabled\n", acpi_format_exception(status), gpe_number)); |
667 | } | 671 | } |
668 | break; | 672 | break; |
669 | 673 | ||
@@ -671,7 +675,7 @@ acpi_ev_gpe_dispatch(struct acpi_gpe_event_info *gpe_event_info, u32 gpe_number) | |||
671 | 675 | ||
672 | /* No handler or method to run! */ | 676 | /* No handler or method to run! */ |
673 | 677 | ||
674 | ACPI_REPORT_ERROR(("acpi_ev_gpe_dispatch: No handler or method for GPE[%2X], disabling event\n", gpe_number)); | 678 | ACPI_REPORT_ERROR(("No handler or method for GPE[%2X], disabling event\n", gpe_number)); |
675 | 679 | ||
676 | /* | 680 | /* |
677 | * Disable the GPE. The GPE will remain disabled until the ACPI | 681 | * Disable the GPE. The GPE will remain disabled until the ACPI |
@@ -679,13 +683,15 @@ acpi_ev_gpe_dispatch(struct acpi_gpe_event_info *gpe_event_info, u32 gpe_number) | |||
679 | */ | 683 | */ |
680 | status = acpi_ev_disable_gpe(gpe_event_info); | 684 | status = acpi_ev_disable_gpe(gpe_event_info); |
681 | if (ACPI_FAILURE(status)) { | 685 | if (ACPI_FAILURE(status)) { |
682 | ACPI_REPORT_ERROR(("acpi_ev_gpe_dispatch: %s, Unable to disable GPE[%2X]\n", acpi_format_exception(status), gpe_number)); | 686 | ACPI_REPORT_ERROR(("%s, Unable to disable GPE[%2X]\n", |
683 | return_VALUE(ACPI_INTERRUPT_NOT_HANDLED); | 687 | acpi_format_exception(status), |
688 | gpe_number)); | ||
689 | return_UINT32(ACPI_INTERRUPT_NOT_HANDLED); | ||
684 | } | 690 | } |
685 | break; | 691 | break; |
686 | } | 692 | } |
687 | 693 | ||
688 | return_VALUE(ACPI_INTERRUPT_HANDLED); | 694 | return_UINT32(ACPI_INTERRUPT_HANDLED); |
689 | } | 695 | } |
690 | 696 | ||
691 | #ifdef ACPI_GPE_NOTIFY_CHECK | 697 | #ifdef ACPI_GPE_NOTIFY_CHECK |