This patch cleans up the wait_event stuff in video1394.c. It looks good
to me and compiles, but I don't have a video1394 device to test with.
If current svn (r1266) works for you, please try this patch and report
back to me or this list. It will apply -p1 in your drivers/ieee1394
directory.
Thanks,
Jody
wait_event cleanup, from Nishanth Aravamudan <nacc@us.ibm.com>
===================================================================
--- ieee1394.orig/video1394.c 2005-01-31 12:22:05.000000000 -0500
+++ ieee1394/video1394.c 2005-02-22 12:30:27.000000000 -0500
@@ -970,24 +970,14 @@ static int __video1394_ioctl(struct file
return -EINTR;
}
-#if 1
- while (d->buffer_status[v.buffer]!=
- VIDEO1394_BUFFER_READY) {
- spin_unlock_irqrestore(&d->lock, flags);
- interruptible_sleep_on(&d->waitq);
- spin_lock_irqsave(&d->lock, flags);
- if (signal_pending(current)) {
- spin_unlock_irqrestore(&d->lock,flags);
- return -EINTR;
- }
- }
-#else
- if (wait_event_interruptible(d->waitq,
- d->buffer_status[v.buffer]
- == VIDEO1394_BUFFER_READY)
- == -ERESTARTSYS)
- return -EINTR;
-#endif
+ spin_unlock_irqrestore(&d->lock, flags);
+ wait_event_interruptible(d->waitq,
+ video1394_buffer_state(d, v.buffer) ==
+ VIDEO1394_BUFFER_READY);
+ if (signal_pending(current))
+ return -EINTR;
+ spin_lock_irqsave(&d->lock, flags);
+
d->buffer_status[v.buffer]=VIDEO1394_BUFFER_FREE;
break;
default:
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
mailing list Linux1394-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux1394-user
Received on Tue Feb 22 18:37:04 2005
This archive was generated by hypermail 2.1.8 : Mon 02 May 2005 - 09:16:53 CEST