diff options
author | Rafael J. Wysocki <rjw@sisk.pl> | 2010-06-25 01:21:42 +0200 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2010-07-06 22:34:27 -0400 |
commit | 3784730b02b9f147a55b0e4623fcad671273e6e6 (patch) | |
tree | cd00f3da44529154938d6c831f1302685a124639 /drivers/acpi | |
parent | b63559f5ce08bc8f94ce144a8d06f7af607ecc53 (diff) | |
download | kernel_samsung_smdk4412-3784730b02b9f147a55b0e4623fcad671273e6e6.zip kernel_samsung_smdk4412-3784730b02b9f147a55b0e4623fcad671273e6e6.tar.gz kernel_samsung_smdk4412-3784730b02b9f147a55b0e4623fcad671273e6e6.tar.bz2 |
ACPI / EC: Do not use acpi_set_gpe
The EC driver is the last user of acpi_set_gpe() and since it is
guaranteed that the EC GPE will not be shared, acpi_disable_gpe()
and acpi_enable_gpe() may be used for disabling the GPE temporarilty
if a GPE storm is detected and re-enabling it during EC transactions.
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/ec.c | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c index 9bf7a75..1e6d418 100644 --- a/drivers/acpi/ec.c +++ b/drivers/acpi/ec.c @@ -313,11 +313,8 @@ static int acpi_ec_transaction(struct acpi_ec *ec, struct transaction *t) pr_debug(PREFIX "transaction start\n"); /* disable GPE during transaction if storm is detected */ if (test_bit(EC_FLAGS_GPE_STORM, &ec->flags)) { - /* - * It has to be disabled at the hardware level regardless of the - * GPE reference counting, so that it doesn't trigger. - */ - acpi_set_gpe(NULL, ec->gpe, ACPI_GPE_DISABLE); + /* It has to be disabled, so that it doesn't trigger. */ + acpi_disable_gpe(NULL, ec->gpe); } status = acpi_ec_transaction_unlocked(ec, t); @@ -326,12 +323,8 @@ static int acpi_ec_transaction(struct acpi_ec *ec, struct transaction *t) ec_check_sci_sync(ec, acpi_ec_read_status(ec)); if (test_bit(EC_FLAGS_GPE_STORM, &ec->flags)) { msleep(1); - /* - * It is safe to enable the GPE outside of the transaction. Use - * acpi_set_gpe() for that, since we used it to disable the GPE - * above. - */ - acpi_set_gpe(NULL, ec->gpe, ACPI_GPE_ENABLE); + /* It is safe to enable the GPE outside of the transaction. */ + acpi_enable_gpe(NULL, ec->gpe); } else if (t->irq_count > ACPI_EC_STORM_THRESHOLD) { pr_info(PREFIX "GPE storm detected, " "transactions will use polling mode\n"); |