aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafael J. Wysocki <rjw@sisk.pl>2010-07-07 18:44:42 -0400
committerLen Brown <len.brown@intel.com>2010-07-12 14:33:35 -0400
commita0d468718b9049f7396d101075a129a2d683ad66 (patch)
treea5003982bda335cf8836e13054673076df6b72c5
parent9ce10df8d83d0528e80cd319b35ac5f6812b4f62 (diff)
ACPI / ACPICA: Simplify acpi_ev_initialize_gpe_block()
Simplify the main loop in acpi_ev_initialize_gpe_block() by rearranging code and removing the "enabled" label that is not necessary any more. Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> Signed-off-by: Len Brown <len.brown@intel.com>
-rw-r--r--drivers/acpi/acpica/evgpeblk.c21
1 files changed, 8 insertions, 13 deletions
diff --git a/drivers/acpi/acpica/evgpeblk.c b/drivers/acpi/acpica/evgpeblk.c
index 12ca1bc5f1fd..85445fb5844e 100644
--- a/drivers/acpi/acpica/evgpeblk.c
+++ b/drivers/acpi/acpica/evgpeblk.c
@@ -472,26 +472,21 @@ acpi_ev_initialize_gpe_block(struct acpi_namespace_node *gpe_device,
472 gpe_event_info = &gpe_block->event_info[gpe_index]; 472 gpe_event_info = &gpe_block->event_info[gpe_index];
473 gpe_number = gpe_index + gpe_block->block_base_number; 473 gpe_number = gpe_index + gpe_block->block_base_number;
474 474
475 /*
476 * If the GPE has already been enabled for runtime
477 * signaling, make sure it remains enabled, but do not
478 * increment its reference counter.
479 */
480 if (gpe_event_info->runtime_count) {
481 status = acpi_ev_enable_gpe(gpe_event_info);
482 goto enabled;
483 }
484
485 /* Ignore GPEs that have no corresponding _Lxx/_Exx method */ 475 /* Ignore GPEs that have no corresponding _Lxx/_Exx method */
486 476
487 if (!(gpe_event_info->flags & ACPI_GPE_DISPATCH_METHOD)) { 477 if (!(gpe_event_info->flags & ACPI_GPE_DISPATCH_METHOD)) {
488 continue; 478 continue;
489 } 479 }
490 480
491 /* Enable this GPE */ 481 /*
482 * If the GPE has already been enabled for runtime
483 * signaling, make sure it remains enabled, but do not
484 * increment its reference counter.
485 */
486 status = gpe_event_info->runtime_count ?
487 acpi_ev_enable_gpe(gpe_event_info) :
488 acpi_enable_gpe(gpe_device, gpe_number);
492 489
493 status = acpi_enable_gpe(gpe_device, gpe_number);
494 enabled:
495 if (ACPI_FAILURE(status)) { 490 if (ACPI_FAILURE(status)) {
496 ACPI_EXCEPTION((AE_INFO, status, 491 ACPI_EXCEPTION((AE_INFO, status,
497 "Could not enable GPE 0x%02X", 492 "Could not enable GPE 0x%02X",