aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/events/evgpe.c
diff options
context:
space:
mode:
authorBob Moore <robert.moore@intel.com>2008-11-12 03:01:56 -0500
committerLen Brown <len.brown@intel.com>2008-12-29 22:38:37 -0500
commit9f15fc666ef54afc7aff31dfa31edecf00e0d81a (patch)
treeb7fee548a54ac5c1a599035e16160a9ac2162e45 /drivers/acpi/events/evgpe.c
parent009c4cbe99bea2da53f29ad685975a36f38c001c (diff)
ACPICA: Reformat comments, no functional changes
Reformat comments to use fewer lines. Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi/events/evgpe.c')
-rw-r--r--drivers/acpi/events/evgpe.c36
1 files changed, 18 insertions, 18 deletions
diff --git a/drivers/acpi/events/evgpe.c b/drivers/acpi/events/evgpe.c
index f45c74fe745e..12b49d312ad3 100644
--- a/drivers/acpi/events/evgpe.c
+++ b/drivers/acpi/events/evgpe.c
@@ -125,7 +125,7 @@ acpi_ev_update_gpe_enable_masks(struct acpi_gpe_event_info *gpe_event_info,
125 (1 << 125 (1 <<
126 (gpe_event_info->gpe_number - gpe_register_info->base_gpe_number)); 126 (gpe_event_info->gpe_number - gpe_register_info->base_gpe_number));
127 127
128 /* 1) Disable case. Simply clear all enable bits */ 128 /* 1) Disable case. Simply clear all enable bits */
129 129
130 if (type == ACPI_GPE_DISABLE) { 130 if (type == ACPI_GPE_DISABLE) {
131 ACPI_CLEAR_BIT(gpe_register_info->enable_for_wake, 131 ACPI_CLEAR_BIT(gpe_register_info->enable_for_wake,
@@ -134,7 +134,7 @@ acpi_ev_update_gpe_enable_masks(struct acpi_gpe_event_info *gpe_event_info,
134 return_ACPI_STATUS(AE_OK); 134 return_ACPI_STATUS(AE_OK);
135 } 135 }
136 136
137 /* 2) Enable case. Set/Clear the appropriate enable bits */ 137 /* 2) Enable case. Set/Clear the appropriate enable bits */
138 138
139 switch (gpe_event_info->flags & ACPI_GPE_TYPE_MASK) { 139 switch (gpe_event_info->flags & ACPI_GPE_TYPE_MASK) {
140 case ACPI_GPE_TYPE_WAKE: 140 case ACPI_GPE_TYPE_WAKE:
@@ -295,7 +295,7 @@ acpi_status acpi_ev_disable_gpe(struct acpi_gpe_event_info *gpe_event_info)
295 * 295 *
296 * FUNCTION: acpi_ev_get_gpe_event_info 296 * FUNCTION: acpi_ev_get_gpe_event_info
297 * 297 *
298 * PARAMETERS: gpe_device - Device node. NULL for GPE0/GPE1 298 * PARAMETERS: gpe_device - Device node. NULL for GPE0/GPE1
299 * gpe_number - Raw GPE number 299 * gpe_number - Raw GPE number
300 * 300 *
301 * RETURN: A GPE event_info struct. NULL if not a valid GPE 301 * RETURN: A GPE event_info struct. NULL if not a valid GPE
@@ -372,7 +372,7 @@ struct acpi_gpe_event_info *acpi_ev_get_gpe_event_info(acpi_handle gpe_device,
372 * 372 *
373 * RETURN: INTERRUPT_HANDLED or INTERRUPT_NOT_HANDLED 373 * RETURN: INTERRUPT_HANDLED or INTERRUPT_NOT_HANDLED
374 * 374 *
375 * DESCRIPTION: Detect if any GP events have occurred. This function is 375 * DESCRIPTION: Detect if any GP events have occurred. This function is
376 * executed at interrupt level. 376 * executed at interrupt level.
377 * 377 *
378 ******************************************************************************/ 378 ******************************************************************************/
@@ -400,8 +400,8 @@ u32 acpi_ev_gpe_detect(struct acpi_gpe_xrupt_info * gpe_xrupt_list)
400 400
401 /* 401 /*
402 * We need to obtain the GPE lock for both the data structs and registers 402 * We need to obtain the GPE lock for both the data structs and registers
403 * Note: Not necessary to obtain the hardware lock, since the GPE registers 403 * Note: Not necessary to obtain the hardware lock, since the GPE
404 * are owned by the gpe_lock. 404 * registers are owned by the gpe_lock.
405 */ 405 */
406 flags = acpi_os_acquire_lock(acpi_gbl_gpe_lock); 406 flags = acpi_os_acquire_lock(acpi_gbl_gpe_lock);
407 407
@@ -410,9 +410,8 @@ u32 acpi_ev_gpe_detect(struct acpi_gpe_xrupt_info * gpe_xrupt_list)
410 gpe_block = gpe_xrupt_list->gpe_block_list_head; 410 gpe_block = gpe_xrupt_list->gpe_block_list_head;
411 while (gpe_block) { 411 while (gpe_block) {
412 /* 412 /*
413 * Read all of the 8-bit GPE status and enable registers 413 * Read all of the 8-bit GPE status and enable registers in this GPE
414 * in this GPE block, saving all of them. 414 * block, saving all of them. Find all currently active GP events.
415 * Find all currently active GP events.
416 */ 415 */
417 for (i = 0; i < gpe_block->register_count; i++) { 416 for (i = 0; i < gpe_block->register_count; i++) {
418 417
@@ -527,8 +526,8 @@ static void ACPI_SYSTEM_XFACE acpi_ev_asynch_execute_gpe_method(void *context)
527 (void)acpi_ev_enable_gpe(gpe_event_info, FALSE); 526 (void)acpi_ev_enable_gpe(gpe_event_info, FALSE);
528 527
529 /* 528 /*
530 * Take a snapshot of the GPE info for this level - we copy the 529 * Take a snapshot of the GPE info for this level - we copy the info to
531 * info to prevent a race condition with remove_handler/remove_block. 530 * prevent a race condition with remove_handler/remove_block.
532 */ 531 */
533 ACPI_MEMCPY(&local_gpe_event_info, gpe_event_info, 532 ACPI_MEMCPY(&local_gpe_event_info, gpe_event_info,
534 sizeof(struct acpi_gpe_event_info)); 533 sizeof(struct acpi_gpe_event_info));
@@ -539,8 +538,8 @@ static void ACPI_SYSTEM_XFACE acpi_ev_asynch_execute_gpe_method(void *context)
539 } 538 }
540 539
541 /* 540 /*
542 * Must check for control method type dispatch one more 541 * Must check for control method type dispatch one more time to avoid a
543 * time to avoid race with ev_gpe_install_handler 542 * race with ev_gpe_install_handler
544 */ 543 */
545 if ((local_gpe_event_info.flags & ACPI_GPE_DISPATCH_MASK) == 544 if ((local_gpe_event_info.flags & ACPI_GPE_DISPATCH_MASK) ==
546 ACPI_GPE_DISPATCH_METHOD) { 545 ACPI_GPE_DISPATCH_METHOD) {
@@ -584,8 +583,8 @@ static void acpi_ev_asynch_enable_gpe(void *context)
584 if ((gpe_event_info->flags & ACPI_GPE_XRUPT_TYPE_MASK) == 583 if ((gpe_event_info->flags & ACPI_GPE_XRUPT_TYPE_MASK) ==
585 ACPI_GPE_LEVEL_TRIGGERED) { 584 ACPI_GPE_LEVEL_TRIGGERED) {
586 /* 585 /*
587 * GPE is level-triggered, we clear the GPE status bit after 586 * GPE is level-triggered, we clear the GPE status bit after handling
588 * handling the event. 587 * the event.
589 */ 588 */
590 status = acpi_hw_clear_gpe(gpe_event_info); 589 status = acpi_hw_clear_gpe(gpe_event_info);
591 if (ACPI_FAILURE(status)) { 590 if (ACPI_FAILURE(status)) {
@@ -624,7 +623,7 @@ acpi_ev_gpe_dispatch(struct acpi_gpe_event_info *gpe_event_info, u32 gpe_number)
624 acpi_os_gpe_count(gpe_number); 623 acpi_os_gpe_count(gpe_number);
625 624
626 /* 625 /*
627 * If edge-triggered, clear the GPE status bit now. Note that 626 * If edge-triggered, clear the GPE status bit now. Note that
628 * level-triggered events are cleared after the GPE is serviced. 627 * level-triggered events are cleared after the GPE is serviced.
629 */ 628 */
630 if ((gpe_event_info->flags & ACPI_GPE_XRUPT_TYPE_MASK) == 629 if ((gpe_event_info->flags & ACPI_GPE_XRUPT_TYPE_MASK) ==
@@ -650,7 +649,8 @@ acpi_ev_gpe_dispatch(struct acpi_gpe_event_info *gpe_event_info, u32 gpe_number)
650 649
651 /* 650 /*
652 * Invoke the installed handler (at interrupt level) 651 * Invoke the installed handler (at interrupt level)
653 * Ignore return status for now. TBD: leave GPE disabled on error? 652 * Ignore return status for now.
653 * TBD: leave GPE disabled on error?
654 */ 654 */
655 (void)gpe_event_info->dispatch.handler->address(gpe_event_info-> 655 (void)gpe_event_info->dispatch.handler->address(gpe_event_info->
656 dispatch. 656 dispatch.
@@ -708,7 +708,7 @@ acpi_ev_gpe_dispatch(struct acpi_gpe_event_info *gpe_event_info, u32 gpe_number)
708 gpe_number)); 708 gpe_number));
709 709
710 /* 710 /*
711 * Disable the GPE. The GPE will remain disabled until the ACPI 711 * Disable the GPE. The GPE will remain disabled until the ACPICA
712 * Core Subsystem is restarted, or a handler is installed. 712 * Core Subsystem is restarted, or a handler is installed.
713 */ 713 */
714 status = acpi_ev_disable_gpe(gpe_event_info); 714 status = acpi_ev_disable_gpe(gpe_event_info);