ACPI / EC: Remove irqs_disabled() check.
authorLv Zheng <lv.zheng@intel.com>
Fri, 15 May 2015 06:16:34 +0000 (14:16 +0800)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Fri, 15 May 2015 23:51:17 +0000 (01:51 +0200)
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>
drivers/acpi/ec.c

index 170d7438780092158f84bb5919cafeefa35a14d8..20bd43f298533ed21fe1154935cb7d6e73bcbd57 100644 (file)
@@ -504,8 +504,7 @@ static int ec_poll(struct acpi_ec *ec)
                        msecs_to_jiffies(ec_delay);
                unsigned long usecs = ACPI_EC_UDELAY_POLL;
                do {
-                       /* don't sleep with disabled interrupts */
-                       if (EC_FLAGS_MSI || irqs_disabled()) {
+                       if (EC_FLAGS_MSI) {
                                usecs = ACPI_EC_MSI_UDELAY;
                                udelay(usecs);
                                if (ec_transaction_completed(ec))