[PATCH] drivers/acpi/osl.c: correct HZ dependencies From: Nishanth Aravamudan The osl driver has a few dependencies on HZ which are not handled correctly for all values. Use msleep_interruptible() and jiffies_to_msecs() to rectify the situation. Patch is compile-tested. Signed-off-by: Nishanth Aravamudan Signed-off-by: Domen Puncer Signed-off-by: Alexey Dobriyan Index: linux-kj/drivers/acpi/osl.c =================================================================== --- linux-kj.orig/drivers/acpi/osl.c 2005-12-05 13:17:53.000000000 +0300 +++ linux-kj/drivers/acpi/osl.c 2005-12-05 13:19:38.000000000 +0300 @@ -313,7 +313,7 @@ acpi_status acpi_os_remove_interrupt_han void acpi_os_sleep(acpi_integer ms) { - schedule_timeout_interruptible(msecs_to_jiffies(ms)); + msleep_interruptible((unsigned int)ms); } EXPORT_SYMBOL(acpi_os_sleep); @@ -833,7 +833,7 @@ acpi_status acpi_os_wait_semaphore(acpi_ // TODO: A better timeout algorithm? { int i = 0; - static const int quantum_ms = 1000 / HZ; + unsigned int quantum_ms = jiffies_to_msecs(1); ret = down_trylock(sem); for (i = timeout; (i > 0 && ret < 0); i -= quantum_ms) {