Skip to contentSkip to conversation

isdn/capi: replace interruptible_sleep_on() with

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

lore
Share & tools
lore
#0 lore raw

PATCH 20/34 isdn/capi: replace interruptible_sleep_on() with

Hi,

Please consider applying.

Description: Use wait_event_interruptible() instead of the deprecated interruptible_sleep_on(). Patch is straight-forward as current sleep is conditionally looped. Patch is compile-tested.

drivers/isdn/capi/capi.c +2 -7
@@ -675,13 +675,8 @@ capi_read(struct file *file, char __user
 		if (file->f_flags & O_NONBLOCK)
 			return -EAGAIN;
 
-		for (;;) {
-			interruptible_sleep_on(&cdev->recvwait);
-			if ((skb = skb_dequeue(&cdev->recvqueue)) != 0)
-				break;
-			if (signal_pending(current))
-				break;
-		}
+		wait_event_interruptible(cdev->recvwait,
+				((skb = skb_dequeue(&cdev->recvqueue)) == 0));
 		if (skb == 0)
 			return -ERESTARTNOHAND;
 	}

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