ChangeSet 1.1982.39.9, 2005/02/10 13:02:21-05:00, [EMAIL PROTECTED]
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 <[EMAIL PROTECTED]>
Signed-off-by: Jody McIntyre <[EMAIL PROTECTED]>
video1394.c | 22 ++++++----------------
1 files changed, 6 insertions(+), 16 deletions(-)
diff -Nru a/drivers/ieee1394/video1394.c b/drivers/ieee1394/video1394.c
--- a/drivers/ieee1394/video1394.c 2005-03-28 23:05:59 -08:00
+++ b/drivers/ieee1394/video1394.c 2005-03-28 23:05:59 -08:00
@@ -982,10 +982,9 @@
}
}
#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;
@@ -1144,19 +1143,10 @@
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:
-
To unsubscribe from this list: send the line "unsubscribe bk-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html