Hans,

On Tue, Jul 10, 2012 at 3:39 AM, Hans Verkuil <hverk...@xs4all.nl> wrote:
>
> Take a look at the latest videobuf2-core.h: I've added helper functions
> that check the owner. You can probably simplify the driver code quite a bit
> by using those helpers.
>

Indeed, using latest vb2_xxx_fop and vb2_ioctl_xxx the driver can be
heavily reduced.
(Great work, by the way)

Almost every function looks like a direct replacement, except for mmap.

If you look at current stk1160, I'm taking the lock for mmap:

        mutex_lock(&dev->v4l_lock);
        rc = vb2_mmap(&dev->vb_vidq, vma);
        mutex_unlock(&dev->v4l_lock);


However, vb2_fop_mmap does no locking. I'm having a hard time understanding
why this is not needed, perhaps you could clarify this a bit?

Thanks,
Ezequiel.
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to