* [KJ] [PATCH] 18/34: ieee1394/video1394: replace
@ 2005-01-25 23:34 Nishanth Aravamudan
0 siblings, 0 replies; only message in thread
From: Nishanth Aravamudan @ 2005-01-25 23:34 UTC (permalink / raw)
To: kernel-janitors
[-- Attachment #1: Type: text/plain, Size: 1778 bytes --]
Hi,
Please consider applying.
Description: Use wait_event_interruptible() instead of the deprecated
interruptible_sleep_on(). The first change is simply to clean up the code a
little to make it clearer. The second actually does a replacement, mimicking
exactly the first. I removed the #if 1/#else/endif logic, as it duplicated the
same code. Patch is compile-tested.
Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
--- 2.6.11-rc2-kj-v/drivers/ieee1394/video1394.c 2005-01-24 09:34:07.000000000 -0800
+++ 2.6.11-rc2-kj/drivers/ieee1394/video1394.c 2005-01-24 15:06:16.000000000 -0800
@@ -964,10 +964,9 @@ static int __video1394_ioctl(struct file
}
}
#else
- if (wait_event_interruptible(d->waitq,
- d->buffer_status[v.buffer]
- == VIDEO1394_BUFFER_READY)
- == -ERESTARTSYS)
+ wait_event_interruptible(d->waitq,
+ (d->buffer_status[v.buffer] == VIDEO1394_BUFFER_READY));
+ if (signal_pending(current))
return -EINTR;
#endif
d->buffer_status[v.buffer]=VIDEO1394_BUFFER_FREE;
@@ -1126,19 +1125,10 @@ static int __video1394_ioctl(struct file
d->buffer_status[v.buffer]=VIDEO1394_BUFFER_FREE;
return 0;
case VIDEO1394_BUFFER_QUEUED:
-#if 1
- while (d->buffer_status[v.buffer]!=
- VIDEO1394_BUFFER_READY) {
- interruptible_sleep_on(&d->waitq);
- if (signal_pending(current)) return -EINTR;
- }
-#else
- if (wait_event_interruptible(d->waitq,
- d->buffer_status[v.buffer]
- == VIDEO1394_BUFFER_READY)
- == -ERESTARTSYS)
+ wait_event_interruptible(d->waitq,
+ (d->buffer_status[v.buffer] == VIDEO1394_BUFFER_READY));
+ if (signal_pending(current))
return -EINTR;
-#endif
d->buffer_status[v.buffer]=VIDEO1394_BUFFER_FREE;
return 0;
default:
[-- 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-25 23:34 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-01-25 23:34 [KJ] [PATCH] 18/34: ieee1394/video1394: replace Nishanth Aravamudan
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.