Skip to contentSkip to conversation

isdn/isdn_common: replace interruptible_sleep_on() with wait_event()

PATCH In review [email protected] 1 participant 1 message Mar 6, 2005

lore
Share & tools
lore
#0 lore raw

PATCH 3/8 isdn/isdn_common: replace interruptible_sleep_on() with wait_event()

Incorrect subject line, sorry.

Use wait_event() instead of the deprecated interruptible_sleep_on(). Current code does not check for signals, so interruptible seems unnecessary. Patch is compile-tested.

---

 kj-domen/drivers/isdn/i4l/isdn_common.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
drivers/isdn/i4l/isdn_common.c renamed from drivers/isdn/i4l/isdn_common.c~int_sleep_on-drivers_isdn_i4l_isdn_common +3 -2
diff -puN drivers/isdn/i4l/isdn_common.c~int_sleep_on-drivers_isdn_i4l_isdn_common drivers/isdn/i4l/isdn_common.c
@@ -19,6 +19,7 @@
 #include <linux/vmalloc.h>
 #include <linux/isdn.h>
 #include <linux/smp_lock.h>
+#include <linux/wait.h>
 #include "isdn_common.h"
 #include "isdn_tty.h"
 #include "isdn_net.h"
@@ -1066,8 +1067,8 @@ isdn_write(struct file *file, const char
 			goto out;
 		}
 		chidx = isdn_minor2chan(minor);
-		while (isdn_writebuf_stub(drvidx, chidx, buf, count) != count)
-			interruptible_sleep_on(&dev->drv[drvidx]->snd_waitq[chidx]);
+		wait_event(dev->drv[drvidx]->snd_waitq[chidx],
+				(isdn_writebuf_stub(drvidx, chidx, buf, count) == count));
 		retval = count;
 		goto out;
 	}

_