From: Nishanth Aravamudan <[email-masked]>

Use schedule_timeout_interruptible() instead of
set_current_state()/schedule_timeout() to reduce kernel size.  Also use
msecs_to_jiffies() instead of direct HZ division to avoid rounding errors.

(akpm: this patch relies on other stuff in -mm, please don't apply)

Signed-off-by: Nishanth Aravamudan <[email-masked]>
Cc: "Brown, Len" <[email-masked]>
Signed-off-by: Andrew Morton <[email-masked]>
---

 drivers/acpi/osl.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

diff -puN drivers/acpi/osl.c~drivers-acpi-fix-up-schedule_timeout-usage drivers/acpi/osl.c
--- devel/drivers/acpi/osl.c~drivers-acpi-fix-up-schedule_timeout-usage	2005-08-30 18:46:23.000000000 -0700
+++ devel-akpm/drivers/acpi/osl.c	2005-08-30 18:46:23.000000000 -0700
@@ -313,8 +313,7 @@ acpi_status acpi_os_remove_interrupt_han
 
 void acpi_os_sleep(acpi_integer ms)
 {
-	current->state = TASK_INTERRUPTIBLE;
-	schedule_timeout(((signed long)ms * HZ) / 1000);
+	schedule_timeout_interruptible(msecs_to_jiffies(ms));
 }
 
 EXPORT_SYMBOL(acpi_os_sleep);
@@ -838,8 +837,7 @@ acpi_status acpi_os_wait_semaphore(acpi_
 
 			ret = down_trylock(sem);
 			for (i = timeout; (i > 0 && ret < 0); i -= quantum_ms) {
-				current->state = TASK_INTERRUPTIBLE;
-				schedule_timeout(1);
+				schedule_timeout_interruptible(1);
 				ret = down_trylock(sem);
 			}
 
_