From 19718efb8307832c54672583359731d6fb01f4d8 Mon Sep 17 00:00:00 2001 From: Thomas Schoebel-Theuer Date: Tue, 8 Nov 2011 12:31:19 +0100 Subject: [PATCH] fix brick_timeout() once again --- brick.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/brick.c b/brick.c index 6e437cb5..57831319 100644 --- a/brick.c +++ b/brick.c @@ -20,11 +20,13 @@ int brick_msleep(int msecs, bool shorten) return 0; } timeout = msecs_to_jiffies(msecs) + 1; - if (shorten) - timeout = schedule_timeout_interruptible(timeout); - else + + timeout = schedule_timeout_interruptible(timeout); + + if (!shorten) while (timeout) - timeout = schedule_timeout_interruptible(timeout); + timeout = schedule_timeout_uninterruptible(timeout); + return jiffies_to_msecs(timeout); } EXPORT_SYMBOL_GPL(brick_msleep);