Skip to contentSkip to conversation

10/34: block/xd: remove sleep_on() usage

PATCH New Nishanth Aravamudan 1 participant 1 message Jan 25, 2005

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 10/34: block/xd: remove sleep_on() usage

Hi,

Please consider applying.

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

drivers/block/xd.c +4 -1
@@ -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;
 	

_______________________________________________
Kernel-janitors mailing list
[email protected]
http://lists.osdl.org/mailman/listinfo/kernel-janitors