mirror of
https://github.com/adulau/aha.git
synced 2024-12-30 12:46:17 +00:00
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>
This commit is contained in:
parent
01f2246269
commit
9fd9f8e8bd
1 changed files with 4 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue