From 9fd9f8e8bdcfc9aa309dae5bccc55d02804337d0 Mon Sep 17 00:00:00 2001 From: Alexey Starikovskiy Date: Wed, 7 Mar 2007 22:28:00 +0300 Subject: ACPI: EC: Block queries until EC is fully initialized Signed-off-by: Alexey Starikovskiy Signed-off-by: Len Brown --- drivers/acpi/ec.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'drivers/acpi') 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; } -- cgit v1.2.3