]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
staging: media: drop vb2_ops_wait_prepare/finish
authorHans Verkuil <hverkuil@xs4all.nl>
Mon, 14 Oct 2024 15:06:36 +0000 (17:06 +0200)
committerHans Verkuil <hverkuil@xs4all.nl>
Mon, 28 Oct 2024 08:20:09 +0000 (09:20 +0100)
Since commit 88785982a19d ("media: vb2: use lock if wait_prepare/finish
are NULL") it is no longer needed to set the wait_prepare/finish
vb2_ops callbacks as long as the lock field in vb2_queue is set.

Since the vb2_ops_wait_prepare/finish callbacks already rely on that field,
we can safely drop these callbacks.

This simplifies the code and this is a step towards the goal of deleting
these callbacks.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> # for meson/vdec
Tested-by: Luca Ceresoli <luca.ceresoli@bootlin.com> # drivers/staging/media/tegra-video/vi.c
12 files changed:
drivers/staging/media/atomisp/pci/atomisp_fops.c
drivers/staging/media/deprecated/atmel/atmel-isc-base.c
drivers/staging/media/imx/imx-media-capture.c
drivers/staging/media/imx/imx-media-csc-scaler.c
drivers/staging/media/ipu3/ipu3-v4l2.c
drivers/staging/media/meson/vdec/vdec.c
drivers/staging/media/rkvdec/rkvdec.c
drivers/staging/media/starfive/camss/stf-video.c
drivers/staging/media/sunxi/cedrus/cedrus_video.c
drivers/staging/media/sunxi/sun6i-isp/sun6i_isp_capture.c
drivers/staging/media/sunxi/sun6i-isp/sun6i_isp_params.c
drivers/staging/media/tegra-video/vi.c

index b180fcbea9b1e6909cf3b6c2cf165684c6cf8667..50c4123ba006648db38c1e310bed4697d49615e0 100644 (file)
@@ -441,8 +441,6 @@ const struct vb2_ops atomisp_vb2_ops = {
        .buf_queue              = atomisp_buf_queue,
        .start_streaming        = atomisp_start_streaming,
        .stop_streaming         = atomisp_stop_streaming,
-       .wait_prepare           = vb2_ops_wait_prepare,
-       .wait_finish            = vb2_ops_wait_finish,
 };
 
 static void atomisp_dev_init_struct(struct atomisp_device *isp)
index 305b103153d7edbf0cdae70fcbb0b6c14432a975..fb9ee8547392b4ee768b39ce08f52488323bb6f9 100644 (file)
@@ -477,8 +477,6 @@ static struct isc_format *find_format_by_fourcc(struct isc_device *isc,
 
 static const struct vb2_ops isc_vb2_ops = {
        .queue_setup            = isc_queue_setup,
-       .wait_prepare           = vb2_ops_wait_prepare,
-       .wait_finish            = vb2_ops_wait_finish,
        .buf_prepare            = isc_buffer_prepare,
        .start_streaming        = isc_start_streaming,
        .stop_streaming         = isc_stop_streaming,
index efa7623b5cee1bbfa77654ad2604758d929a2045..e9cef7af000a91674aa2cfe750a399cae40ff9d6 100644 (file)
@@ -768,8 +768,6 @@ static const struct vb2_ops capture_qops = {
        .buf_init        = capture_buf_init,
        .buf_prepare     = capture_buf_prepare,
        .buf_queue       = capture_buf_queue,
-       .wait_prepare    = vb2_ops_wait_prepare,
-       .wait_finish     = vb2_ops_wait_finish,
        .start_streaming = capture_start_streaming,
        .stop_streaming  = capture_stop_streaming,
 };
index 95cca281e8a378c6244bd25d5b81c392712361aa..e5e08c6f79f222a86fbe528d84d5e9644fbbb63a 100644 (file)
@@ -572,8 +572,6 @@ static const struct vb2_ops ipu_csc_scaler_qops = {
        .queue_setup            = ipu_csc_scaler_queue_setup,
        .buf_prepare            = ipu_csc_scaler_buf_prepare,
        .buf_queue              = ipu_csc_scaler_buf_queue,
-       .wait_prepare           = vb2_ops_wait_prepare,
-       .wait_finish            = vb2_ops_wait_finish,
        .start_streaming        = ipu_csc_scaler_start_streaming,
        .stop_streaming         = ipu_csc_scaler_stop_streaming,
 };
index e7aee7e3db5bbdb8c0cb555e5d2a5c2e4ae0c161..ad6095bf717db6d3fc1cd19112884248a6b04fce 100644 (file)
@@ -937,8 +937,6 @@ static const struct vb2_ops imgu_vb2_ops = {
        .queue_setup = imgu_vb2_queue_setup,
        .start_streaming = imgu_vb2_start_streaming,
        .stop_streaming = imgu_vb2_stop_streaming,
-       .wait_prepare = vb2_ops_wait_prepare,
-       .wait_finish = vb2_ops_wait_finish,
 };
 
 /****************** v4l2_file_operations *****************/
index 5e5b296f93bab4faf01f1e4238057e072e540680..52185090129ba5a5c5f3d7747f7d00268375aa33 100644 (file)
@@ -450,8 +450,6 @@ static const struct vb2_ops vdec_vb2_ops = {
        .stop_streaming = vdec_stop_streaming,
        .buf_queue = vdec_vb2_buf_queue,
        .buf_prepare = vdec_vb2_buf_prepare,
-       .wait_prepare = vb2_ops_wait_prepare,
-       .wait_finish = vb2_ops_wait_finish,
 };
 
 static int
index ac398b5a97360446672a8a5c40ea05bcf222f557..f468af64bbef1c7e9019352508f95f5e2d2a083a 100644 (file)
@@ -617,8 +617,6 @@ static const struct vb2_ops rkvdec_queue_ops = {
        .buf_request_complete = rkvdec_buf_request_complete,
        .start_streaming = rkvdec_start_streaming,
        .stop_streaming = rkvdec_stop_streaming,
-       .wait_prepare = vb2_ops_wait_prepare,
-       .wait_finish = vb2_ops_wait_finish,
 };
 
 static int rkvdec_request_validate(struct media_request *req)
index 989b5e82bae98fdbcec7b2b28f4a93bc7a8334f3..a0420eb6a0aa034fb0b1468951d84c8fe7bb1b56 100644 (file)
@@ -321,8 +321,6 @@ static void video_stop_streaming(struct vb2_queue *q)
 
 static const struct vb2_ops stf_video_vb2_q_ops = {
        .queue_setup     = video_queue_setup,
-       .wait_prepare    = vb2_ops_wait_prepare,
-       .wait_finish     = vb2_ops_wait_finish,
        .buf_init        = video_buf_init,
        .buf_prepare     = video_buf_prepare,
        .buf_queue       = video_buf_queue,
index b00feaf4072c995b4e54ffa6c67bffe039be1f49..77f78266f406288cfd5aa666dd5e3409b5a770cf 100644 (file)
@@ -570,8 +570,6 @@ static const struct vb2_ops cedrus_qops = {
        .buf_request_complete   = cedrus_buf_request_complete,
        .start_streaming        = cedrus_start_streaming,
        .stop_streaming         = cedrus_stop_streaming,
-       .wait_prepare           = vb2_ops_wait_prepare,
-       .wait_finish            = vb2_ops_wait_finish,
 };
 
 int cedrus_queue_init(void *priv, struct vb2_queue *src_vq,
index 0eea4c2c3627188cbe0de74839e37835fdfdbc35..24899f41dc1c12dbbe43b01d176b4ec9ce287f06 100644 (file)
@@ -368,8 +368,6 @@ static const struct vb2_ops sun6i_isp_capture_queue_ops = {
        .buf_queue              = sun6i_isp_capture_buffer_queue,
        .start_streaming        = sun6i_isp_capture_start_streaming,
        .stop_streaming         = sun6i_isp_capture_stop_streaming,
-       .wait_prepare           = vb2_ops_wait_prepare,
-       .wait_finish            = vb2_ops_wait_finish,
 };
 
 /* Video Device */
index 53d05e8a364bb7ed060a957034ef28ef91209fd1..3d95ed0b023e314ae189d20747868b962278b14e 100644 (file)
@@ -379,8 +379,6 @@ static const struct vb2_ops sun6i_isp_params_queue_ops = {
        .buf_queue              = sun6i_isp_params_buffer_queue,
        .start_streaming        = sun6i_isp_params_start_streaming,
        .stop_streaming         = sun6i_isp_params_stop_streaming,
-       .wait_prepare           = vb2_ops_wait_prepare,
-       .wait_finish            = vb2_ops_wait_finish,
 };
 
 /* Video Device */
index 57a856a21e9013e5b179e45e42a4512ff466de0a..ad481b35e618a0b0e85af7276d84342440b82e64 100644 (file)
@@ -287,8 +287,6 @@ static const struct vb2_ops tegra_channel_queue_qops = {
        .queue_setup = tegra_channel_queue_setup,
        .buf_prepare = tegra_channel_buffer_prepare,
        .buf_queue = tegra_channel_buffer_queue,
-       .wait_prepare = vb2_ops_wait_prepare,
-       .wait_finish = vb2_ops_wait_finish,
        .start_streaming = tegra_channel_start_streaming,
        .stop_streaming = tegra_channel_stop_streaming,
 };