ACPI: EC: count interrupts only if called from interrupt handler.
authorAlexey Starikovskiy <astarikovskiy@suse.de>
Thu, 13 Nov 2008 09:00:03 +0000 (12:00 +0300)
committerLen Brown <len.brown@intel.com>
Wed, 26 Nov 2008 22:16:45 +0000 (17:16 -0500)
fix 2.6.28 EC interrupt storm regression

Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de>
Signed-off-by: Len Brown <len.brown@intel.com>
drivers/acpi/ec.c

index cf41f9fc24a73fed7d7bd0799f654050609ef128..30f3ef236ecb1b354548c5bb2570866eaa8ec6be 100644 (file)
@@ -219,7 +219,8 @@ static void gpe_transaction(struct acpi_ec *ec, u8 status)
        goto unlock;
 err:
        /* false interrupt, state didn't change */
-       ++ec->curr->irq_count;
+       if (in_interrupt())
+               ++ec->curr->irq_count;
 unlock:
        spin_unlock_irqrestore(&ec->curr_lock, flags);
 }