kernel-janitors.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [KJ] [PATCH 20/34] isdn/capi: replace interruptible_sleep_on() with
@ 2005-01-26  0:06 Nishanth Aravamudan
  0 siblings, 0 replies; only message in thread
From: Nishanth Aravamudan @ 2005-01-26  0:06 UTC (permalink / raw)
  To: kernel-janitors

[-- Attachment #1: Type: text/plain, Size: 873 bytes --]

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.

Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>

--- 2.6.11-rc2-kj-v/drivers/isdn/capi/capi.c	2005-01-24 09:34:07.000000000 -0800
+++ 2.6.11-rc2-kj/drivers/isdn/capi/capi.c	2005-01-24 15:51:41.000000000 -0800
@@ -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;
 	}

[-- Attachment #2: Type: text/plain, Size: 167 bytes --]

_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
http://lists.osdl.org/mailman/listinfo/kernel-janitors

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2005-01-26  0:06 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-01-26  0:06 [KJ] [PATCH 20/34] isdn/capi: replace interruptible_sleep_on() with Nishanth Aravamudan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).