Skip to contentSkip to conversation

media/zoran_device: replace

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

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

PATCH 23/34 media/zoran_device: replace

Hi,

Please consider applying.

Description: Use wait_event_interruptible() instead of the deprecated interruptible_sleep_on(). Patch is compile-tested.

drivers/media/video/zoran_device.c +5 -5
@@ -46,6 +46,7 @@
 #include <linux/video_decoder.h>
 #include <linux/video_encoder.h>
 #include <linux/delay.h>
+#include <linux/wait.h>
 
 #include <asm/io.h>
 
@@ -696,11 +697,10 @@ wait_grab_pending (struct zoran *zr)
 	if (!zr->v4l_memgrab_active)
 		return 0;
 
-	while (zr->v4l_pend_tail != zr->v4l_pend_head) {
-		interruptible_sleep_on(&zr->v4l_capq);
-		if (signal_pending(current))
-			return -ERESTARTSYS;
-	}
+	wait_event_interruptible(zr->v4l_capq,
+			(zr->v4l_pend_tail == zr->v4l_pend_head));
+	if (signal_pending(current))
+		return -ERESTARTSYS;
 
 	spin_lock_irqsave(&zr->spinlock, flags);
 	zr36057_set_memgrab(zr, 0);

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