]>
Commit | Line | Data |
---|---|---|
c169d663 | 1 | --- linux/drivers/acpi/osl.c~ 2003-10-26 20:14:19.000000000 -0700 |
2 | +++ linux/drivers/acpi/osl.c 2003-10-26 19:53:33.000000000 -0700 | |
3 | @@ -40,6 +40,7 @@ | |
4 | #include <asm/io.h> | |
5 | #include <acpi/acpi_bus.h> | |
6 | #include <asm/uaccess.h> | |
7 | +#include <asm/hardirq.h> | |
8 | ||
9 | #ifdef CONFIG_ACPI_EFI | |
10 | #include <linux/efi.h> | |
11 | @@ -290,8 +291,12 @@ | |
12 | void | |
13 | acpi_os_sleep(u32 sec, u32 ms) | |
14 | { | |
15 | - current->state = TASK_INTERRUPTIBLE; | |
16 | - schedule_timeout(HZ * sec + (ms * HZ) / 1000); | |
17 | + if (!in_atomic()) { | |
18 | + current->state = TASK_INTERRUPTIBLE; | |
19 | + schedule_timeout(HZ * sec + (ms * HZ) / 1000); | |
20 | + } else { | |
21 | + acpi_os_stall(sec * 1000000 + ms * 1000); | |
22 | + } | |
23 | } | |
24 | ||
25 | void |