aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLv Zheng <lv.zheng@intel.com>2015-05-15 02:16:34 -0400
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2015-05-15 19:51:17 -0400
commit373783e6e9394b0dd5050eba152f436e08577d69 (patch)
tree0d57092fc5bb08777c87d8633ab4fd8fe1c016d3
parent5ab82a11e58b6af704976f5d50ce098472f8abbd (diff)
ACPI / EC: Remove irqs_disabled() check.
The following commit merges polling and interrupt modes for EC driver: Commit: 2a84cb9852f52c0cd1c48bca41a8792d44ad06cc Mon Sep 17 00:00:00 2001 Subject: ACPI: EC: Merge IRQ and POLL modes The irqs_disabled() check introduced in it tries to fall into busy polling mode when the context of ec_poll() cannot sleep. Actually ec_poll() is ensured to be invoked in the contexts that can sleep (from a sysfs /sys/kernel/debug/ec/ec0/io access, or from acpi_evaluate_object(), or from acpi_ec_gpe_poller()). Without the MSI quirk, we never saw the udelay() logic invoked. Thus this check is useless and can be removed. Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
-rw-r--r--drivers/acpi/ec.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c
index 170d74387800..20bd43f29853 100644
--- a/drivers/acpi/ec.c
+++ b/drivers/acpi/ec.c
@@ -504,8 +504,7 @@ static int ec_poll(struct acpi_ec *ec)
504 msecs_to_jiffies(ec_delay); 504 msecs_to_jiffies(ec_delay);
505 unsigned long usecs = ACPI_EC_UDELAY_POLL; 505 unsigned long usecs = ACPI_EC_UDELAY_POLL;
506 do { 506 do {
507 /* don't sleep with disabled interrupts */ 507 if (EC_FLAGS_MSI) {
508 if (EC_FLAGS_MSI || irqs_disabled()) {
509 usecs = ACPI_EC_MSI_UDELAY; 508 usecs = ACPI_EC_MSI_UDELAY;
510 udelay(usecs); 509 udelay(usecs);
511 if (ec_transaction_completed(ec)) 510 if (ec_transaction_completed(ec))