summaryrefslogtreecommitdiff
path: root/drivers/char/ds1620.c
diff options
context:
space:
mode:
authorDomen Puncer <domen@coderock.org>2005-06-26 01:58:41 +0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-06-26 03:24:57 +0400
commitd8eddb620499dc638aeb4d5d3751974ca697ab39 (patch)
tree50ae4be7b9018c1136893852bec208c40061415f /drivers/char/ds1620.c
parentd2a457cf26020fb7aa992915388001eb983d0aa8 (diff)
downloadlinux-d8eddb620499dc638aeb4d5d3751974ca697ab39.tar.xz
[PATCH] char/ds1620: use msleep() instead of schedule_timeout()
Not sure why any driver needs to sleep for *two* ticks, so let's fix it. Use msleep() instead of schedule_timeout() to guarantee the task delays as expected. Signals are never checked for by the callers or in the function itself, so use TASK_UNINTERRUPTIBLE instead of TASK_INTERRUPTIBLE. The delay is presumed to have been written when HZ==100, and thus has been multiplied by 10 to pass to msleep(). Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com> Signed-off-by: Domen Puncer <domen@coderock.org> Acked-by: Russell King <rmk@arm.linux.org.uk> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/char/ds1620.c')
-rw-r--r--drivers/char/ds1620.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/char/ds1620.c b/drivers/char/ds1620.c
index 7def6ad51798..62cda25724e3 100644
--- a/drivers/char/ds1620.c
+++ b/drivers/char/ds1620.c
@@ -163,8 +163,7 @@ static void ds1620_out(int cmd, int bits, int value)
netwinder_ds1620_reset();
netwinder_unlock(&flags);
- set_current_state(TASK_INTERRUPTIBLE);
- schedule_timeout(2);
+ msleep(20);
}
static unsigned int ds1620_in(int cmd, int bits)