aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/tm6000
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2010-06-07 12:10:14 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2010-08-02 14:06:00 -0300
commitd0669c872ff68cac5ab312569e716c12171440a9 (patch)
treeae661bc1f1c9500ca891e0310fdb1dd6bc77deff /drivers/staging/tm6000
parentV4L/DVB: tm6000: audio packet has always 180 bytes (diff)
downloadlinux-dev-d0669c872ff68cac5ab312569e716c12171440a9.tar.xz
linux-dev-d0669c872ff68cac5ab312569e716c12171440a9.zip
V4L/DVB: tm6000: Fix copybuf continue logic
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/staging/tm6000')
-rw-r--r--drivers/staging/tm6000/tm6000-video.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/staging/tm6000/tm6000-video.c b/drivers/staging/tm6000/tm6000-video.c
index 6bf2b1387bd0..9a0b5a78c957 100644
--- a/drivers/staging/tm6000/tm6000-video.c
+++ b/drivers/staging/tm6000/tm6000-video.c
@@ -285,7 +285,7 @@ static int copy_streams(u8 *data, unsigned long len,
break;
case TM6000_URB_MSG_AUDIO:
case TM6000_URB_MSG_PTS:
- cpysize = pktsize; /* Size is always 180 bytes */
+ size = pktsize; /* Size is always 180 bytes */
break;
}
} else {
@@ -315,7 +315,7 @@ static int copy_streams(u8 *data, unsigned long len,
break;
}
}
- if (ptr + pktsize > endp) {
+ if (cpysize < size) {
/* End of URB packet, but cmd processing is not
* complete. Preserve the state for a next packet
*/
@@ -323,7 +323,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 += endp - ptr;
+ ptr += cpysize;
} else {
dev->isoc_ctl.cmd = 0;
ptr += pktsize;