diff options
author | Rafael J. Wysocki <rjw@sisk.pl> | 2010-07-01 05:01:12 +0200 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2010-07-07 04:34:27 +0200 |
commit | 3bd741bd0dfcc1845ae6892baa5192c91addc84c (patch) | |
tree | 3effbfaefa7dfee2c7d7223772847236ea53f718 /drivers/acpi/acpica/evgpeblk.c | |
parent | ACPI / EC: Do not use acpi_set_gpe (diff) | |
download | linux-3bd741bd0dfcc1845ae6892baa5192c91addc84c.tar.xz linux-3bd741bd0dfcc1845ae6892baa5192c91addc84c.zip |
ACPICA: Use low-level GPE enable during GPE block initialization
The GPE block initialization code in acpi_ev_initialize_gpe_block()
uses acpi_set_gpe() to make sure that the GPEs with nonzero
runtime counter will remain enabled, but since it already has
a struct acpi_gpe_event_info object for each GPE, it might use
the low-level GPE enabling function, acpi_clear_and_enable_gpe(),
for this purpose.
To make that happen, move acpi_clear_and_enable_gpe() to
drivers/acpi/acpica/evgpe.c and rename it to acpi_ev_enable_gpe(),
modify the two existing users of it accordingly and modify
acpi_ev_initialize_gpe_block() to use it instead of acpi_set_gpe()
and to check its return value.
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Len Brown <len.brown@intel.com>
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/acpica/evgpeblk.c')
-rw-r--r-- | drivers/acpi/acpica/evgpeblk.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/acpi/acpica/evgpeblk.c b/drivers/acpi/acpica/evgpeblk.c index 77e8630043f8..0c6f3f878eb5 100644 --- a/drivers/acpi/acpica/evgpeblk.c +++ b/drivers/acpi/acpica/evgpeblk.c @@ -508,10 +508,8 @@ acpi_ev_initialize_gpe_block(struct acpi_namespace_node *gpe_device, * increment its reference counter. */ if (gpe_event_info->runtime_count) { - acpi_set_gpe(gpe_device, gpe_number, - ACPI_GPE_ENABLE); - gpe_enabled_count++; - continue; + status = acpi_ev_enable_gpe(gpe_event_info); + goto enabled; } if (gpe_event_info->flags & ACPI_GPE_CAN_WAKE) { @@ -530,6 +528,7 @@ acpi_ev_initialize_gpe_block(struct acpi_namespace_node *gpe_device, /* Enable this GPE */ status = acpi_enable_gpe(gpe_device, gpe_number); + enabled: if (ACPI_FAILURE(status)) { ACPI_EXCEPTION((AE_INFO, status, "Could not enable GPE 0x%02X", |