[PATCH 542] M68k/stdma: Replace sleep_on() with wait_event()

From: Geert Uytterhoeven
Date: Mon Mar 21 2005 - 15:33:21 EST


M68k/stdma: 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.

Signed-off-by: Nishanth Aravamudan <nacc@xxxxxxxxxx>
Signed-off-by: Geert Uytterhoeven <geert@xxxxxxxxxxxxxx>

--- linux-2.6.12-rc1/arch/m68k/atari/stdma.c 2005-01-15 16:55:41.000000000 -0800
+++ linux-m68k-2.6.12-rc1/arch/m68k/atari/stdma.c 2005-01-19 17:25:33.000000000 -0800
@@ -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;

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/