V4L/DVB (13230): s2255drv: Don't conditionalize video buffer completion on waiting...
authorMike Isely <isely@pobox.com>
Wed, 23 Sep 2009 21:06:57 +0000 (18:06 -0300)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 8 Dec 2009 18:21:15 +0000 (10:21 -0800)
commit7b9acdf264761c1a8fdd3696a04e3a47d3a44e23
treef60aa903f85e303f95da8f4cda80e619d773081f
parentc43d7819934b796560ffc14371dcc69089d1fb81
V4L/DVB (13230): s2255drv: Don't conditionalize video buffer completion on waiting processes

commit 1f95725755ab67f3198df3b5bf7517f926f310ca upstream.

The s2255 driver had logic which aborted processing of a video frame
if there was no process waiting on the video buffer in question.  That
simply doesn't work when the application is doing things in an
asynchronous manner.  If the application went to the trouble to queue
the buffer in the first place, then the driver should always attempt
to complete it - even if the application at that moment has its
attention turned elsewhere.  Applications which always blocked waiting
for I/O on the capture device would not have been affected by this.
Applications which *mostly* blocked waiting for I/O on the capture
device probably only would have been somewhat affected (frame lossage,
at a rate which goes up as the application blocks less).  Applications
which never blocked on the capture device (e.g. polling only) however
would never have been able to receive any video frames, since in that
case this "is anyone waiting on this?" check on the buffer never would
have evalutated true.  This patch just deletes that harmful check
against the buffer's wait queue.

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Michael Krufky <mkrufky@kernellabs.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/media/video/s2255drv.c