diff options
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/platform/vivid/vivid-core.c | 19 | ||||
-rw-r--r-- | drivers/media/platform/vivid/vivid-core.h | 3 | ||||
-rw-r--r-- | drivers/media/platform/vivid/vivid-sdr-cap.c | 4 | ||||
-rw-r--r-- | drivers/media/platform/vivid/vivid-vbi-cap.c | 4 | ||||
-rw-r--r-- | drivers/media/platform/vivid/vivid-vbi-out.c | 4 | ||||
-rw-r--r-- | drivers/media/platform/vivid/vivid-vid-cap.c | 4 | ||||
-rw-r--r-- | drivers/media/platform/vivid/vivid-vid-out.c | 4 |
7 files changed, 15 insertions, 27 deletions
diff --git a/drivers/media/platform/vivid/vivid-core.c b/drivers/media/platform/vivid/vivid-core.c index 686c3c2ad05b..987a46cdea5e 100644 --- a/drivers/media/platform/vivid/vivid-core.c +++ b/drivers/media/platform/vivid/vivid-core.c @@ -195,20 +195,6 @@ static const u8 vivid_hdmi_edid[256] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd7 }; -void vivid_lock(struct vb2_queue *vq) -{ - struct vivid_dev *dev = vb2_get_drv_priv(vq); - - mutex_lock(&dev->mutex); -} - -void vivid_unlock(struct vb2_queue *vq) -{ - struct vivid_dev *dev = vb2_get_drv_priv(vq); - - mutex_unlock(&dev->mutex); -} - static int vidioc_querycap(struct file *file, void *priv, struct v4l2_capability *cap) { @@ -1018,6 +1004,7 @@ static int __init vivid_create_instance(int inst) q->mem_ops = &vb2_vmalloc_memops; q->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC; q->min_buffers_needed = 2; + q->lock = &dev->mutex; ret = vb2_queue_init(q); if (ret) @@ -1036,6 +1023,7 @@ static int __init vivid_create_instance(int inst) q->mem_ops = &vb2_vmalloc_memops; q->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC; q->min_buffers_needed = 2; + q->lock = &dev->mutex; ret = vb2_queue_init(q); if (ret) @@ -1054,6 +1042,7 @@ static int __init vivid_create_instance(int inst) q->mem_ops = &vb2_vmalloc_memops; q->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC; q->min_buffers_needed = 2; + q->lock = &dev->mutex; ret = vb2_queue_init(q); if (ret) @@ -1072,6 +1061,7 @@ static int __init vivid_create_instance(int inst) q->mem_ops = &vb2_vmalloc_memops; q->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC; q->min_buffers_needed = 2; + q->lock = &dev->mutex; ret = vb2_queue_init(q); if (ret) @@ -1089,6 +1079,7 @@ static int __init vivid_create_instance(int inst) q->mem_ops = &vb2_vmalloc_memops; q->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC; q->min_buffers_needed = 8; + q->lock = &dev->mutex; ret = vb2_queue_init(q); if (ret) diff --git a/drivers/media/platform/vivid/vivid-core.h b/drivers/media/platform/vivid/vivid-core.h index 811c286491a5..6f4445ad7d4d 100644 --- a/drivers/media/platform/vivid/vivid-core.h +++ b/drivers/media/platform/vivid/vivid-core.h @@ -514,7 +514,4 @@ static inline bool vivid_is_hdmi_out(const struct vivid_dev *dev) return dev->output_type[dev->output] == HDMI; } -void vivid_lock(struct vb2_queue *vq); -void vivid_unlock(struct vb2_queue *vq); - #endif diff --git a/drivers/media/platform/vivid/vivid-sdr-cap.c b/drivers/media/platform/vivid/vivid-sdr-cap.c index 8c5d661cfc49..4af55f18829f 100644 --- a/drivers/media/platform/vivid/vivid-sdr-cap.c +++ b/drivers/media/platform/vivid/vivid-sdr-cap.c @@ -297,8 +297,8 @@ const struct vb2_ops vivid_sdr_cap_qops = { .buf_queue = sdr_cap_buf_queue, .start_streaming = sdr_cap_start_streaming, .stop_streaming = sdr_cap_stop_streaming, - .wait_prepare = vivid_unlock, - .wait_finish = vivid_lock, + .wait_prepare = vb2_ops_wait_prepare, + .wait_finish = vb2_ops_wait_finish, }; int vivid_sdr_enum_freq_bands(struct file *file, void *fh, struct v4l2_frequency_band *band) diff --git a/drivers/media/platform/vivid/vivid-vbi-cap.c b/drivers/media/platform/vivid/vivid-vbi-cap.c index 2166d0bf6fe2..ef81b01b53d2 100644 --- a/drivers/media/platform/vivid/vivid-vbi-cap.c +++ b/drivers/media/platform/vivid/vivid-vbi-cap.c @@ -236,8 +236,8 @@ const struct vb2_ops vivid_vbi_cap_qops = { .buf_queue = vbi_cap_buf_queue, .start_streaming = vbi_cap_start_streaming, .stop_streaming = vbi_cap_stop_streaming, - .wait_prepare = vivid_unlock, - .wait_finish = vivid_lock, + .wait_prepare = vb2_ops_wait_prepare, + .wait_finish = vb2_ops_wait_finish, }; int vidioc_g_fmt_vbi_cap(struct file *file, void *priv, diff --git a/drivers/media/platform/vivid/vivid-vbi-out.c b/drivers/media/platform/vivid/vivid-vbi-out.c index 9d00a07ecdcd..4e4c70e1e04a 100644 --- a/drivers/media/platform/vivid/vivid-vbi-out.c +++ b/drivers/media/platform/vivid/vivid-vbi-out.c @@ -131,8 +131,8 @@ const struct vb2_ops vivid_vbi_out_qops = { .buf_queue = vbi_out_buf_queue, .start_streaming = vbi_out_start_streaming, .stop_streaming = vbi_out_stop_streaming, - .wait_prepare = vivid_unlock, - .wait_finish = vivid_lock, + .wait_prepare = vb2_ops_wait_prepare, + .wait_finish = vb2_ops_wait_finish, }; int vidioc_g_fmt_vbi_out(struct file *file, void *priv, diff --git a/drivers/media/platform/vivid/vivid-vid-cap.c b/drivers/media/platform/vivid/vivid-vid-cap.c index 331c54429b40..1309d311c627 100644 --- a/drivers/media/platform/vivid/vivid-vid-cap.c +++ b/drivers/media/platform/vivid/vivid-vid-cap.c @@ -288,8 +288,8 @@ const struct vb2_ops vivid_vid_cap_qops = { .buf_queue = vid_cap_buf_queue, .start_streaming = vid_cap_start_streaming, .stop_streaming = vid_cap_stop_streaming, - .wait_prepare = vivid_unlock, - .wait_finish = vivid_lock, + .wait_prepare = vb2_ops_wait_prepare, + .wait_finish = vb2_ops_wait_finish, }; /* diff --git a/drivers/media/platform/vivid/vivid-vid-out.c b/drivers/media/platform/vivid/vivid-vid-out.c index 69c2dbd2d165..078bc35571b4 100644 --- a/drivers/media/platform/vivid/vivid-vid-out.c +++ b/drivers/media/platform/vivid/vivid-vid-out.c @@ -209,8 +209,8 @@ const struct vb2_ops vivid_vid_out_qops = { .buf_queue = vid_out_buf_queue, .start_streaming = vid_out_start_streaming, .stop_streaming = vid_out_stop_streaming, - .wait_prepare = vivid_unlock, - .wait_finish = vivid_lock, + .wait_prepare = vb2_ops_wait_prepare, + .wait_finish = vb2_ops_wait_finish, }; /* |