summaryrefslogtreecommitdiffstats
path: root/drivers/acpi/ec.c
diff options
context:
space:
mode:
authorAlexey Starikovskiy <alexey.y.starikovskiy@intel.com>2007-03-07 20:28:00 +0100
committerLen Brown <len.brown@intel.com>2007-03-10 05:27:29 +0100
commit9fd9f8e8bdcfc9aa309dae5bccc55d02804337d0 (patch)
tree75bcbbe973c48583c187446d4f31e3558192c194 /drivers/acpi/ec.c
parentACPI: EC: Cleanup of EC initialization (diff)
downloadlinux-9fd9f8e8bdcfc9aa309dae5bccc55d02804337d0.tar.xz
linux-9fd9f8e8bdcfc9aa309dae5bccc55d02804337d0.zip
ACPI: EC: Block queries until EC is fully initialized
Signed-off-by: Alexey Starikovskiy <alexey.y.starikovskiy@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi/ec.c')
-rw-r--r--drivers/acpi/ec.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c
index 2a172299b24c..e08cf98f504f 100644
--- a/drivers/acpi/ec.c
+++ b/drivers/acpi/ec.c
@@ -599,7 +599,7 @@ static struct acpi_ec *make_acpi_ec(void)
if (!ec)
return NULL;
- atomic_set(&ec->query_pending, 0);
+ atomic_set(&ec->query_pending, 1);
atomic_set(&ec->event_count, 1);
mutex_init(&ec->lock);
init_waitqueue_head(&ec->wait);
@@ -715,6 +715,9 @@ static int ec_install_handlers(struct acpi_ec *ec)
return -ENODEV;
}
+ /* EC is fully operational, allow queries */
+ atomic_set(&ec->query_pending, 0);
+
return 0;
}