* [patch 3/8] isdn/isdn_common: replace interruptible_sleep_on() with wait_event()
@ 2005-03-06 22:38 domen
0 siblings, 0 replies; only message in thread
From: domen @ 2005-03-06 22:38 UTC (permalink / raw)
To: akpm; +Cc: linux-kernel, isdn4linux, domen, nacc
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 <nacc@us.ibm.com>
Signed-off-by: Domen Puncer <domen@coderock.org>
---
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;
}
_
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2005-03-06 22:45 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-03-06 22:38 [patch 3/8] isdn/isdn_common: replace interruptible_sleep_on() with wait_event() domen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®