From: Christian Borntraeger <linux-kernel@borntraeger.net>

During the wakeup from suspend-to-ram I get several warnings.

Signed-off-by: Christian Borntraeger <linux-kernel@borntraeger.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
---

 25-akpm/drivers/acpi/osl.c      |    4 ++--
 25-akpm/drivers/acpi/pci_link.c |    2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff -puN drivers/acpi/osl.c~acpi-sleep-while-atomic-during-s3-resume-from-ram drivers/acpi/osl.c
--- 25/drivers/acpi/osl.c~acpi-sleep-while-atomic-during-s3-resume-from-ram	2005-02-23 01:48:02.000000000 -0800
+++ 25-akpm/drivers/acpi/osl.c	2005-02-23 01:48:02.000000000 -0800
@@ -145,7 +145,7 @@ acpi_os_vprintf(const char *fmt, va_list
 void *
 acpi_os_allocate(acpi_size size)
 {
-	return kmalloc(size, GFP_KERNEL);
+	return kmalloc(size, GFP_ATOMIC);
 }
 
 void
@@ -905,7 +905,7 @@ acpi_os_wait_semaphore(
 
 	ACPI_DEBUG_PRINT ((ACPI_DB_MUTEX, "Waiting for semaphore[%p|%d|%d]\n", handle, units, timeout));
 
-	if (in_atomic())
+	if (in_atomic() || irqs_disabled())
 		timeout = 0;
 
 	switch (timeout)
diff -puN drivers/acpi/pci_link.c~acpi-sleep-while-atomic-during-s3-resume-from-ram drivers/acpi/pci_link.c
--- 25/drivers/acpi/pci_link.c~acpi-sleep-while-atomic-during-s3-resume-from-ram	2005-02-23 01:48:02.000000000 -0800
+++ 25-akpm/drivers/acpi/pci_link.c	2005-02-23 01:48:02.000000000 -0800
@@ -315,7 +315,7 @@ acpi_pci_link_set (
 	if (!link || !irq)
 		return_VALUE(-EINVAL);
 
-	resource = kmalloc( sizeof(*resource)+1, GFP_KERNEL);
+	resource = kmalloc( sizeof(*resource)+1, GFP_ATOMIC);
 	if(!resource)
 		return_VALUE(-ENOMEM);
 
_