Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 232175
b: refs/heads/master
c: ee36299
h: refs/heads/master
i:
  232173: 95b75a8
  232171: af5c3ac
  232167: d2d3fad
  232159: 102b97c
v: v3
  • Loading branch information
Hans de Goede authored and Mauro Carvalho Chehab committed Jan 19, 2011
1 parent f360972 commit ed65281
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 13 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: d642de2ed472df308f8ee49417e29030f69b2095
refs/heads/master: ee3629914b2b115f00f4197e80b1e7cb12881059
14 changes: 2 additions & 12 deletions trunk/drivers/media/video/gspca/gspca.c
Original file line number Diff line number Diff line change
Expand Up @@ -2019,9 +2019,7 @@ static unsigned int dev_poll(struct file *file, poll_table *wait)
poll_wait(file, &gspca_dev->wq, wait);

/* if reqbufs is not done, the user would use read() */
if (gspca_dev->nframes == 0) {
if (gspca_dev->memory != GSPCA_MEMORY_NO)
return POLLERR; /* not the 1st time */
if (gspca_dev->memory == GSPCA_MEMORY_NO) {
ret = read_alloc(gspca_dev, file);
if (ret != 0)
return POLLERR;
Expand Down Expand Up @@ -2053,18 +2051,10 @@ static ssize_t dev_read(struct file *file, char __user *data,
PDEBUG(D_FRAM, "read (%zd)", count);
if (!gspca_dev->present)
return -ENODEV;
switch (gspca_dev->memory) {
case GSPCA_MEMORY_NO: /* first time */
if (gspca_dev->memory == GSPCA_MEMORY_NO) { /* first time ? */
ret = read_alloc(gspca_dev, file);
if (ret != 0)
return ret;
break;
case GSPCA_MEMORY_READ:
if (gspca_dev->capt_file == file)
break;
/* fall thru */
default:
return -EINVAL;
}

/* get a frame */
Expand Down

0 comments on commit ed65281

Please sign in to comment.