Re: [RFCv3 PATCH 26/33] videobuf2-core: add helper functions.

2012-06-28 Thread Hans Verkuil
On Thu 28 June 2012 11:27:26 Scott Jiang wrote: > > +int vb2_fop_mmap(struct file *file, struct vm_area_struct *vma) > > +{ > > + struct video_device *vdev = video_devdata(file); > > + > > + return vb2_mmap(vdev->queue, vma); > > +} > > +EXPORT_SYMBOL_GPL(vb2_fop_mmap); > Missed one fil

Re: [RFCv3 PATCH 26/33] videobuf2-core: add helper functions.

2012-06-28 Thread Scott Jiang
> +int vb2_fop_mmap(struct file *file, struct vm_area_struct *vma) > +{ > +       struct video_device *vdev = video_devdata(file); > + > +       return vb2_mmap(vdev->queue, vma); > +} > +EXPORT_SYMBOL_GPL(vb2_fop_mmap); Missed one file ops. #ifndef CONFIG_MMU unsigned long vb2_fop_get_unmapped_ar

[RFCv3 PATCH 26/33] videobuf2-core: add helper functions.

2012-06-27 Thread Hans Verkuil
From: Hans Verkuil Add helper functions to make it easier to adapt drivers to vb2. These helpers take care of core locking and check if the filehandle is the owner of the queue. Signed-off-by: Hans Verkuil --- drivers/media/video/videobuf2-core.c | 227 ++ inc