aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/acpica/evgpe.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/acpi/acpica/evgpe.c')
-rw-r--r--drivers/acpi/acpica/evgpe.c23
1 files changed, 12 insertions, 11 deletions
diff --git a/drivers/acpi/acpica/evgpe.c b/drivers/acpi/acpica/evgpe.c
index e4ba4dec86af..2095dfb72bcb 100644
--- a/drivers/acpi/acpica/evgpe.c
+++ b/drivers/acpi/acpica/evgpe.c
@@ -100,13 +100,14 @@ acpi_ev_update_gpe_enable_mask(struct acpi_gpe_event_info *gpe_event_info)
100 * 100 *
101 * FUNCTION: acpi_ev_enable_gpe 101 * FUNCTION: acpi_ev_enable_gpe
102 * 102 *
103 * PARAMETERS: gpe_event_info - GPE to enable 103 * PARAMETERS: gpe_event_info - GPE to enable
104 * 104 *
105 * RETURN: Status 105 * RETURN: Status
106 * 106 *
107 * DESCRIPTION: Clear a GPE of stale events and enable it. 107 * DESCRIPTION: Clear a GPE of stale events and enable it.
108 * 108 *
109 ******************************************************************************/ 109 ******************************************************************************/
110
110acpi_status acpi_ev_enable_gpe(struct acpi_gpe_event_info *gpe_event_info) 111acpi_status acpi_ev_enable_gpe(struct acpi_gpe_event_info *gpe_event_info)
111{ 112{
112 acpi_status status; 113 acpi_status status;
@@ -125,6 +126,7 @@ acpi_status acpi_ev_enable_gpe(struct acpi_gpe_event_info *gpe_event_info)
125 } 126 }
126 127
127 /* Clear the GPE (of stale events) */ 128 /* Clear the GPE (of stale events) */
129
128 status = acpi_hw_clear_gpe(gpe_event_info); 130 status = acpi_hw_clear_gpe(gpe_event_info);
129 if (ACPI_FAILURE(status)) { 131 if (ACPI_FAILURE(status)) {
130 return_ACPI_STATUS(status); 132 return_ACPI_STATUS(status);
@@ -136,7 +138,6 @@ acpi_status acpi_ev_enable_gpe(struct acpi_gpe_event_info *gpe_event_info)
136 return_ACPI_STATUS(status); 138 return_ACPI_STATUS(status);
137} 139}
138 140
139
140/******************************************************************************* 141/*******************************************************************************
141 * 142 *
142 * FUNCTION: acpi_ev_add_gpe_reference 143 * FUNCTION: acpi_ev_add_gpe_reference
@@ -212,7 +213,7 @@ acpi_ev_remove_gpe_reference(struct acpi_gpe_event_info *gpe_event_info)
212 if (ACPI_SUCCESS(status)) { 213 if (ACPI_SUCCESS(status)) {
213 status = 214 status =
214 acpi_hw_low_set_gpe(gpe_event_info, 215 acpi_hw_low_set_gpe(gpe_event_info,
215 ACPI_GPE_DISABLE); 216 ACPI_GPE_DISABLE);
216 } 217 }
217 218
218 if (ACPI_FAILURE(status)) { 219 if (ACPI_FAILURE(status)) {
@@ -334,7 +335,7 @@ struct acpi_gpe_event_info *acpi_ev_get_gpe_event_info(acpi_handle gpe_device,
334 * 335 *
335 ******************************************************************************/ 336 ******************************************************************************/
336 337
337u32 acpi_ev_gpe_detect(struct acpi_gpe_xrupt_info * gpe_xrupt_list) 338u32 acpi_ev_gpe_detect(struct acpi_gpe_xrupt_info *gpe_xrupt_list)
338{ 339{
339 acpi_status status; 340 acpi_status status;
340 struct acpi_gpe_block_info *gpe_block; 341 struct acpi_gpe_block_info *gpe_block;
@@ -427,7 +428,7 @@ u32 acpi_ev_gpe_detect(struct acpi_gpe_xrupt_info * gpe_xrupt_list)
427 428
428 /* Check if there is anything active at all in this register */ 429 /* Check if there is anything active at all in this register */
429 430
430 enabled_status_byte = (u8) (status_reg & enable_reg); 431 enabled_status_byte = (u8)(status_reg & enable_reg);
431 if (!enabled_status_byte) { 432 if (!enabled_status_byte) {
432 433
433 /* No active GPEs in this register, move on */ 434 /* No active GPEs in this register, move on */
@@ -450,7 +451,7 @@ u32 acpi_ev_gpe_detect(struct acpi_gpe_xrupt_info * gpe_xrupt_list)
450 acpi_ev_gpe_dispatch(gpe_block-> 451 acpi_ev_gpe_dispatch(gpe_block->
451 node, 452 node,
452 &gpe_block-> 453 &gpe_block->
453 event_info[((acpi_size) i * ACPI_GPE_REGISTER_WIDTH) + j], j + gpe_register_info->base_gpe_number); 454 event_info[((acpi_size) i * ACPI_GPE_REGISTER_WIDTH) + j], j + gpe_register_info->base_gpe_number);
454 } 455 }
455 } 456 }
456 } 457 }
@@ -636,7 +637,7 @@ static void ACPI_SYSTEM_XFACE acpi_ev_asynch_enable_gpe(void *context)
636 * 637 *
637 ******************************************************************************/ 638 ******************************************************************************/
638 639
639acpi_status acpi_ev_finish_gpe(struct acpi_gpe_event_info *gpe_event_info) 640acpi_status acpi_ev_finish_gpe(struct acpi_gpe_event_info * gpe_event_info)
640{ 641{
641 acpi_status status; 642 acpi_status status;
642 643
@@ -666,9 +667,9 @@ acpi_status acpi_ev_finish_gpe(struct acpi_gpe_event_info *gpe_event_info)
666 * 667 *
667 * FUNCTION: acpi_ev_gpe_dispatch 668 * FUNCTION: acpi_ev_gpe_dispatch
668 * 669 *
669 * PARAMETERS: gpe_device - Device node. NULL for GPE0/GPE1 670 * PARAMETERS: gpe_device - Device node. NULL for GPE0/GPE1
670 * gpe_event_info - Info for this GPE 671 * gpe_event_info - Info for this GPE
671 * gpe_number - Number relative to the parent GPE block 672 * gpe_number - Number relative to the parent GPE block
672 * 673 *
673 * RETURN: INTERRUPT_HANDLED or INTERRUPT_NOT_HANDLED 674 * RETURN: INTERRUPT_HANDLED or INTERRUPT_NOT_HANDLED
674 * 675 *
@@ -681,7 +682,7 @@ acpi_status acpi_ev_finish_gpe(struct acpi_gpe_event_info *gpe_event_info)
681 682
682u32 683u32
683acpi_ev_gpe_dispatch(struct acpi_namespace_node *gpe_device, 684acpi_ev_gpe_dispatch(struct acpi_namespace_node *gpe_device,
684 struct acpi_gpe_event_info *gpe_event_info, u32 gpe_number) 685 struct acpi_gpe_event_info *gpe_event_info, u32 gpe_number)
685{ 686{
686 acpi_status status; 687 acpi_status status;
687 u32 return_value; 688 u32 return_value;