Skip to contentSkip to conversation

m68k/stdma: replace sleep_on() with wait_event()

PATCH Applied Nishanth Aravamudan 1 participant 1 message Jan 20, 2005

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

PATCH 15/39 m68k/stdma: replace sleep_on() with wait_event()

Hi,

Please consider applying.

Description: Use wait_event() instead of the deprecated sleep_on() function. Since wait_event() expects the condition passed in to be the stopping condition, negate the current one.

arch/m68k/atari/stdma.c +5 -5
@@ -34,6 +34,7 @@
 #include <linux/sched.h>
 #include <linux/init.h>
 #include <linux/interrupt.h>
+#include <linux/wait.h>
 
 #include <asm/atari_stdma.h>
 #include <asm/atariints.h>
@@ -81,11 +82,10 @@ void stdma_lock(irqreturn_t (*handler)(i
 
 	local_irq_save(flags);		/* protect lock */
 
-	while(stdma_locked)
-		/* Since the DMA is used for file system purposes, we
-		 have to sleep uninterruptible (there may be locked
-		 buffers) */
-		sleep_on(&stdma_wait);
+	/* Since the DMA is used for file system purposes, we
+	 have to sleep uninterruptible (there may be locked
+	 buffers) */
+	wait_event(stdma_wait, !stdma_locked);
 
 	stdma_locked   = 1;
 	stdma_isr      = handler;

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