summaryrefslogtreecommitdiffstats
path: root/drivers/acpi
diff options
context:
space:
mode:
authorNishanth Aravamudan <nacc@us.ibm.com>2005-11-07 01:01:14 -0800
committerLinus Torvalds <torvalds@g5.osdl.org>2005-11-07 07:53:56 -0800
commit01a527ec7c62efea601a39f0cd8e6a8517259014 (patch)
tree153c92030c0d77b7c4a38fd978ad9f089b14df92 /drivers/acpi
parentbc874d174b224c016adac85fc9dd6da1161ffc57 (diff)
downloadblackbird-op-linux-01a527ec7c62efea601a39f0cd8e6a8517259014.tar.gz
blackbird-op-linux-01a527ec7c62efea601a39f0cd8e6a8517259014.zip
[PATCH] drivers/acpi: fix-up schedule_timeout() usage
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. Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com> Cc: "Brown, Len" <len.brown@intel.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/acpi')
-rw-r--r--drivers/acpi/osl.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/acpi/osl.c b/drivers/acpi/osl.c
index d528c750a380..e3cd0b16031a 100644
--- a/drivers/acpi/osl.c
+++ b/drivers/acpi/osl.c
@@ -313,8 +313,7 @@ acpi_status acpi_os_remove_interrupt_handler(u32 irq, acpi_osd_handler handler)
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_handle handle, u32 units, u16 timeout)
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);
}
OpenPOWER on IntegriCloud