2005-03-06 22:45:30

by Domen Puncer

[permalink] [raw]
Subject: [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.

Signed-off-by: Nishanth Aravamudan <[email protected]>
Signed-off-by: Domen Puncer <[email protected]>
---


kj-domen/drivers/isdn/i4l/isdn_common.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)

diff -puN drivers/isdn/i4l/isdn_common.c~int_sleep_on-drivers_isdn_i4l_isdn_common drivers/isdn/i4l/isdn_common.c
--- kj/drivers/isdn/i4l/isdn_common.c~int_sleep_on-drivers_isdn_i4l_isdn_common 2005-03-05 16:11:37.000000000 +0100
+++ kj-domen/drivers/isdn/i4l/isdn_common.c 2005-03-05 16:11:37.000000000 +0100
@@ -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;
}
_