lkml.org 
[lkml]   [2005]   [Jun]   [21]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
DateMon, 20 Jun 2005 23:51:37 +0200
From domen@coderock ...
Subject[patch 07/12] block/xd: remove sleep_on() usage
From: Nishanth Aravamudan <nacc@us.ibm.com>



Directly use wait-queues instead of the deprecated sleep_on().
This required adding a local waitqueue. Patch is compile-tested.

Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
Signed-off-by: Domen Puncer <domen@coderock.org>
---
 xd.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletion(-)
Index: quilt/drivers/block/xd.c
===================================================================
--- quilt.orig/drivers/block/xd.c
+++ quilt/drivers/block/xd.c
@@ -538,6 +538,7 @@ static inline u_char xd_waitport (u_shor
 
 static inline u_int xd_wait_for_IRQ (void)
 {
+	DEFINE_WAIT(wait);
 	unsigned long flags;
 	xd_watchdog_int.expires = jiffies + 8 * HZ;
 	add_timer(&xd_watchdog_int);
@@ -546,7 +547,9 @@ static inline u_int xd_wait_for_IRQ (voi
 	enable_dma(xd_dma);
 	release_dma_lock(flags);
 	
-	sleep_on(&xd_wait_int);
+	prepare_to_wait(&xd_wait_int, &wait, TASK_UNINTERRUPTIBLE);
+	schedule();
+	finish_wait(&xd_wait_int, &wait);
 	del_timer(&xd_watchdog_int);
 	xdc_busy = 0;
 	
--
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-06-21 08:49    [from the cache]
©2003-2008