]> rtime.felk.cvut.cz Git - lisovros/linux_canprio.git/blobdiff - drivers/acpi/ec.c
ACPI / EC / PM: Fix race between EC transactions and system suspend
[lisovros/linux_canprio.git] / drivers / acpi / ec.c
index f2234db85da041ae72b450ef7b73c102000933e1..2c2b73a2a7c2b2e672e399330e9451af29a84de3 100644 (file)
@@ -485,6 +485,16 @@ void acpi_ec_resume_transactions(void)
        mutex_unlock(&ec->lock);
 }
 
+void acpi_ec_resume_transactions_early(void)
+{
+       /*
+        * Allow transactions to happen again (this function is called from
+        * atomic context during wakeup, so we don't need to acquire the mutex).
+        */
+       if (first_ec)
+               clear_bit(EC_FLAGS_FROZEN, &first_ec->flags);
+}
+
 static int acpi_ec_query_unlocked(struct acpi_ec *ec, u8 * data)
 {
        int result;