Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 268441
b: refs/heads/master
c: 55c37c0
h: refs/heads/master
i:
  268439: e892290
v: v3
  • Loading branch information
Leonid V. Fedorenchik authored and Greg Kroah-Hartman committed Sep 16, 2011
1 parent fedc45a commit ca826b5
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 28 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: 20e8a366c0a04ff4c12465e9eb0d38b7a0e4efb4
refs/heads/master: 55c37c0d6c9f447b2d42d0505471e8edcf283d5f
54 changes: 27 additions & 27 deletions trunk/drivers/staging/cx25821/cx25821-video.c
Original file line number Diff line number Diff line change
Expand Up @@ -882,41 +882,41 @@ static ssize_t video_read(struct file *file, char __user * data, size_t count,
static unsigned int video_poll(struct file *file,
struct poll_table_struct *wait)
{
struct cx25821_fh *fh = file->private_data;
struct cx25821_buffer *buf;
struct cx25821_fh *fh = file->private_data;
struct cx25821_buffer *buf;

if (cx25821_res_check(fh, RESOURCE_VIDEO0)) {
/* streaming capture */
if (list_empty(&fh->vidq.stream))
return POLLERR;
buf = list_entry(fh->vidq.stream.next,
if (cx25821_res_check(fh, RESOURCE_VIDEO0)) {
/* streaming capture */
if (list_empty(&fh->vidq.stream))
return POLLERR;
buf = list_entry(fh->vidq.stream.next,
struct cx25821_buffer, vb.stream);
} else {
/* read() capture */
buf = (struct cx25821_buffer *)fh->vidq.read_buf;
if (NULL == buf)
return POLLERR;
}
} else {
/* read() capture */
buf = (struct cx25821_buffer *)fh->vidq.read_buf;
if (NULL == buf)
return POLLERR;
}

poll_wait(file, &buf->vb.done, wait);
if (buf->vb.state == VIDEOBUF_DONE || buf->vb.state == VIDEOBUF_ERROR) {
if (buf->vb.state == VIDEOBUF_DONE) {
struct cx25821_dev *dev = fh->dev;
poll_wait(file, &buf->vb.done, wait);
if (buf->vb.state == VIDEOBUF_DONE || buf->vb.state == VIDEOBUF_ERROR) {
if (buf->vb.state == VIDEOBUF_DONE) {
struct cx25821_dev *dev = fh->dev;

if (dev && dev->channels[fh->channel_id]
.use_cif_resolution) {
u8 cam_id = *((char *)buf->vb.baddr + 3);
memcpy((char *)buf->vb.baddr,
if (dev && dev->channels[fh->channel_id]
.use_cif_resolution) {
u8 cam_id = *((char *)buf->vb.baddr + 3);
memcpy((char *)buf->vb.baddr,
(char *)buf->vb.baddr + (fh->width * 2),
(fh->width * 2));
*((char *)buf->vb.baddr + 3) = cam_id;
}
}
*((char *)buf->vb.baddr + 3) = cam_id;
}
}

return POLLIN | POLLRDNORM;
}
return POLLIN | POLLRDNORM;
}

return 0;
return 0;
}

static int video_release(struct file *file)
Expand Down

0 comments on commit ca826b5

Please sign in to comment.