[PATCH] capi: replace interruptible_sleep_on() with wait_event_interruptible() From: Nishanth Aravamudan Use wait_event_interruptible() instead of the deprecated interruptible_sleep_on(). Patch is straight-forward as current sleep is conditionally looped. Compile-tested. Signed-off-by: Nishanth Aravamudan Signed-off-by: Domen Puncer Signed-off-by: Alexey Dobriyan Index: linux-kj/drivers/isdn/capi/capi.c =================================================================== --- linux-kj.orig/drivers/isdn/capi/capi.c 2005-10-28 16:25:14.000000000 +0400 +++ linux-kj/drivers/isdn/capi/capi.c 2005-10-28 16:26:22.000000000 +0400 @@ -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; }