Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 113840
b: refs/heads/master
c: 69025c9
h: refs/heads/master
v: v3
  • Loading branch information
Antoine Jacquet authored and Mauro Carvalho Chehab committed Oct 12, 2008
1 parent 037e582 commit 77cb46c
Show file tree
Hide file tree
Showing 2 changed files with 11 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: 06fcadbf8b63e395d3ae8421a8c3cb2dfd0bc56b
refs/heads/master: 69025c934b21a9ce49a76dfef59f1ebdfbe96c78
23 changes: 10 additions & 13 deletions trunk/drivers/media/video/zr364xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -641,35 +641,31 @@ static int zr364xx_open(struct inode *inode, struct file *file)

DBG("zr364xx_open");

mutex_lock(&cam->lock);

cam->skip = 2;

lock_kernel();
err = video_exclusive_open(inode, file);
if (err < 0) {
unlock_kernel();
return err;
}
if (err < 0)
goto out;

if (!cam->framebuf) {
cam->framebuf = vmalloc_32(MAX_FRAME_SIZE * FRAMES);
if (!cam->framebuf) {
info("vmalloc_32 failed!");
unlock_kernel();
return -ENOMEM;
err = -ENOMEM;
goto out;
}
}

mutex_lock(&cam->lock);
for (i = 0; init[cam->method][i].size != -1; i++) {
err =
send_control_msg(udev, 1, init[cam->method][i].value,
0, init[cam->method][i].bytes,
init[cam->method][i].size);
if (err < 0) {
info("error during open sequence: %d", i);
mutex_unlock(&cam->lock);
unlock_kernel();
return err;
goto out;
}
}

Expand All @@ -679,10 +675,11 @@ static int zr364xx_open(struct inode *inode, struct file *file)
* like Ekiga does during its startup, can crash the webcam
*/
mdelay(100);
err = 0;

out:
mutex_unlock(&cam->lock);
unlock_kernel();
return 0;
return err;
}


Expand Down

0 comments on commit 77cb46c

Please sign in to comment.