]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[PATCH] char/ds1620: use msleep() instead of schedule_timeout()
authorDomen Puncer <domen@coderock.org>
Sat, 25 Jun 2005 21:58:41 +0000 (14:58 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Sat, 25 Jun 2005 23:24:57 +0000 (16:24 -0700)
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>
drivers/char/ds1620.c

index 7def6ad517984c27542b8b4942081299119aba2a..62cda25724e30d6501870683c53849f5d8e273a5 100644 (file)
@@ -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)