Commit 0da54fb8 authored by Andy Grover's avatar Andy Grover

ACPI: Ensure we don't try to sleep when we shouldn't

parent f0f91a9f
...@@ -717,6 +717,9 @@ acpi_os_wait_semaphore( ...@@ -717,6 +717,9 @@ acpi_os_wait_semaphore(
ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "Waiting for semaphore[%p|%d|%d]\n", handle, units, timeout)); ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "Waiting for semaphore[%p|%d|%d]\n", handle, units, timeout));
if (in_atomic())
timeout = 0;
switch (timeout) switch (timeout)
{ {
/* /*
...@@ -838,7 +841,7 @@ acpi_os_writable(void *ptr, u32 len) ...@@ -838,7 +841,7 @@ acpi_os_writable(void *ptr, u32 len)
u32 u32
acpi_os_get_thread_id (void) acpi_os_get_thread_id (void)
{ {
if (!in_interrupt()) if (!in_atomic())
return current->pid; return current->pid;
return 0; return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment