提交 8eb4476d 编写于 作者: G Guennadi Liakhovetski 提交者: Mauro Carvalho Chehab

[media] V4L: soc-camera: add helper functions for videobuf queue handling

Add two helper inline functions to retrieve soc-camera device context
from videobuf and videobuf2 queue pointers.
Signed-off-by: NGuennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
上级 592c2aba
......@@ -306,6 +306,16 @@ static inline struct video_device *soc_camera_i2c_to_vdev(struct i2c_client *cli
return icd->vdev;
}
static inline struct soc_camera_device *soc_camera_from_vb2q(struct vb2_queue *vq)
{
return container_of(vq, struct soc_camera_device, vb2_vidq);
}
static inline struct soc_camera_device *soc_camera_from_vbq(struct videobuf_queue *vq)
{
return container_of(vq, struct soc_camera_device, vb_vidq);
}
void soc_camera_lock(struct vb2_queue *vq);
void soc_camera_unlock(struct vb2_queue *vq);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册