浏览代码

Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6

* 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6:
  [media] v4l: soc-camera: fix multiple simultaneous user case
Linus Torvalds 14 年之前
父节点
当前提交
bec41d5b84
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      drivers/media/video/soc_camera.c

+ 2 - 2
drivers/media/video/soc_camera.c

@@ -405,13 +405,13 @@ static int soc_camera_open(struct file *file)
 		ret = soc_camera_set_fmt(icd, &f);
 		if (ret < 0)
 			goto esfmt;
+
+		ici->ops->init_videobuf(&icd->vb_vidq, icd);
 	}
 
 	file->private_data = icd;
 	dev_dbg(&icd->dev, "camera device open\n");
 
-	ici->ops->init_videobuf(&icd->vb_vidq, icd);
-
 	mutex_unlock(&icd->video_lock);
 
 	return 0;