aboutsummaryrefslogtreecommitdiff
path: root/drivers/staging
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2010-06-30 17:24:28 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2010-08-02 14:06:02 -0300
commitccfb30288228aaaf40a849bffe434bc9eb46b23c (patch)
tree67662f13ac99c56eb7dbf942341d8f35458ee6e7 /drivers/staging
parent758bb0b3e77d7876b76e48b4ac20f473be004421 (diff)
V4L/DVB: tm6000: Partially revert some copybuf logic
Partially revert changeset 0208bef609242a2d50b95edc713a41566cae500b: As pointed by Stefan Ringel <stefan.ringel@arcor.de>, many packets become damaged by this change. That means that the "size" field of Video/VBI is not presenting 180 bytes, as it should be expected. Thanks-to: Stefan Ringel <stefan.ringel@arcor.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/staging')
-rw-r--r--drivers/staging/tm6000/tm6000-video.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/staging/tm6000/tm6000-video.c b/drivers/staging/tm6000/tm6000-video.c
index fd36b36407c..ce0a089a077 100644
--- a/drivers/staging/tm6000/tm6000-video.c
+++ b/drivers/staging/tm6000/tm6000-video.c
@@ -314,7 +314,7 @@ static int copy_streams(u8 *data, unsigned long len,
break;
}
}
- if (cpysize < size) {
+ if (ptr + pktsize > endp) {
/* End of URB packet, but cmd processing is not
* complete. Preserve the state for a next packet
*/
@@ -322,7 +322,7 @@ static int copy_streams(u8 *data, unsigned long len,
dev->isoc_ctl.size = size - cpysize;
dev->isoc_ctl.cmd = cmd;
dev->isoc_ctl.pktsize = pktsize - (endp - ptr);
- ptr += cpysize;
+ ptr += endp - ptr;
} else {
dev->isoc_ctl.cmd = 0;
ptr += pktsize;