Commit 949bd408 authored by Hans Verkuil's avatar Hans Verkuil Committed by Mauro Carvalho Chehab

[media] marvell-ccic: use vb2 helpers and core locking

Use the V4L2 core locking system instead of rolling your own. Switch to
the vb2 fop and ioctl helpers to get rid of a lot of code. This also made
it easy to add VB2_READ to the DMA modes, since you get read() for free
with vb2 and these helpers.

Finally remove the users field: this information is also available from
the core framework, no need to keep track of it in the driver.
Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
Acked-by: default avatarJonathan Corbet <corbet@lwn.net>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@osg.samsung.com>
parent 87d18430
...@@ -146,7 +146,6 @@ struct mcam_camera { ...@@ -146,7 +146,6 @@ struct mcam_camera {
struct v4l2_ctrl_handler ctrl_handler; struct v4l2_ctrl_handler ctrl_handler;
enum mcam_state state; enum mcam_state state;
unsigned long flags; /* Buffer status, mainly (dev_lock) */ unsigned long flags; /* Buffer status, mainly (dev_lock) */
int users; /* How many open FDs */
struct mcam_frame_state frame_state; /* Frame state counter */ struct mcam_frame_state frame_state; /* Frame state counter */
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment