diff options
author | Rafael J. Wysocki <rjw@sisk.pl> | 2010-07-08 02:44:42 +0400 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2010-07-12 22:33:35 +0400 |
commit | a0d468718b9049f7396d101075a129a2d683ad66 (patch) | |
tree | a5003982bda335cf8836e13054673076df6b72c5 /drivers/acpi | |
parent | 9ce10df8d83d0528e80cd319b35ac5f6812b4f62 (diff) | |
download | linux-a0d468718b9049f7396d101075a129a2d683ad66.tar.xz |
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>
Diffstat (limited to 'drivers/acpi')
-rw-r--r-- | drivers/acpi/acpica/evgpeblk.c | 21 |
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, gpe_event_info = &gpe_block->event_info[gpe_index]; gpe_number = gpe_index + gpe_block->block_base_number; - /* - * If the GPE has already been enabled for runtime - * signaling, make sure it remains enabled, but do not - * increment its reference counter. - */ - if (gpe_event_info->runtime_count) { - status = acpi_ev_enable_gpe(gpe_event_info); - goto enabled; - } - /* Ignore GPEs that have no corresponding _Lxx/_Exx method */ if (!(gpe_event_info->flags & ACPI_GPE_DISPATCH_METHOD)) { continue; } - /* Enable this GPE */ + /* + * If the GPE has already been enabled for runtime + * signaling, make sure it remains enabled, but do not + * increment its reference counter. + */ + status = gpe_event_info->runtime_count ? + acpi_ev_enable_gpe(gpe_event_info) : + acpi_enable_gpe(gpe_device, gpe_number); - status = acpi_enable_gpe(gpe_device, gpe_number); - enabled: if (ACPI_FAILURE(status)) { ACPI_EXCEPTION((AE_INFO, status, "Could not enable GPE 0x%02X", |