Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 92635
b: refs/heads/master
c: e0fadfd
h: refs/heads/master
i:
  92633: 69d19b5
  92631: 50986d9
v: v3
  • Loading branch information
Aidan Thornton authored and Mauro Carvalho Chehab committed Apr 24, 2008
1 parent ca87308 commit 0bb1df7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 14 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e74153d44a57d9445fb1dfad7c3accbec6d4a873
refs/heads/master: e0fadfd34dda2205b296b8826acfaaf4df2e022f
20 changes: 7 additions & 13 deletions trunk/drivers/media/video/em28xx/em28xx-video.c
Original file line number Diff line number Diff line change
Expand Up @@ -135,14 +135,6 @@ static inline void buffer_filled(struct em28xx *dev,
{
mod_timer(&dma_q->timeout, jiffies+BUFFER_TIMEOUT);

/* Nobody is waiting something to be done, just return */
if (!waitqueue_active(&buf->vb.done)) {
printk(KERN_ERR "em28xx: buffer underrun at %ld\n",
jiffies);

return;
}

/* Advice that buffer was filled */
em28xx_isocdbg("[%p/%d] wakeup\n", buf, buf->vb.i);
buf->vb.state = VIDEOBUF_DONE;
Expand Down Expand Up @@ -202,7 +194,8 @@ static void em28xx_copy_video(struct em28xx *dev,
((char *)outp + buf->vb.size));
lencopy = remain = (char *)outp + buf->vb.size - (char *)startwrite;
}
BUG_ON(lencopy <= 0);
if (lencopy <= 0)
return;
memcpy(startwrite, startread, lencopy);

remain -= lencopy;
Expand Down Expand Up @@ -356,11 +349,13 @@ static inline int em28xx_isoc_copy(struct urb *urb)
if (p[0] == 0x22 && p[1] == 0x5a) {
/* FIXME - are the fields the right way around? */
em28xx_isocdbg("Video frame, length=%i, %s\n", len,
(p[2] & 1)? "top" : "bottom");
(p[2] & 1)? "odd" : "even");
em28xx_isocdbg("Current buffer is: outp = 0x%p,"
" len = %i\n", outp, (int)buf->vb.size);

if (p[2] & 1) {
if (p[2] & 1)
buf->top_field = 0;
else {
if (buf->receiving) {
buffer_filled(dev, dma_q, buf);
rc = get_next_buf(dma_q, &buf);
Expand All @@ -371,8 +366,7 @@ static inline int em28xx_isoc_copy(struct urb *urb)
}

buf->top_field = 1;
} else
buf->top_field = 0;
}
buf->receiving = 1;
dma_q->pos = 0;
} else if (p[0] == 0x33 && p[1] == 0x95 && p[2] == 0x00) {
Expand Down

0 comments on commit 0bb1df7

Please sign in to comment.