]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
media: rcar-vin: Use v4l2_subdev_{enable|disable}_streams()
authorTomi Valkeinen <tomi.valkeinen+renesas@ideasonboard.com>
Mon, 20 Jan 2025 13:10:38 +0000 (15:10 +0200)
committerHans Verkuil <hverkuil@xs4all.nl>
Tue, 4 Mar 2025 12:35:33 +0000 (13:35 +0100)
Use v4l2_subdev_{enable|disable}_streams() instead of calling s_stream
op directly. This allows the called subdev to drop the legacy s_stream
op.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen+renesas@ideasonboard.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
drivers/media/platform/renesas/rcar-vin/rcar-dma.c

index 8773998101ffb5f8b52c48d47fbf3edd5dd9ed58..8de8712404409c1e75a121f0fba095704948b475 100644 (file)
@@ -1397,7 +1397,7 @@ static int rvin_set_stream(struct rvin_dev *vin, int on)
 
        if (!on) {
                video_device_pipeline_stop(&vin->vdev);
-               return v4l2_subdev_call(sd, video, s_stream, 0);
+               return v4l2_subdev_disable_streams(sd, pad->index, BIT_ULL(0));
        }
 
        ret = rvin_mc_validate_format(vin, sd, pad);
@@ -1408,7 +1408,7 @@ static int rvin_set_stream(struct rvin_dev *vin, int on)
        if (ret)
                return ret;
 
-       ret = v4l2_subdev_call(sd, video, s_stream, 1);
+       ret = v4l2_subdev_enable_streams(sd, pad->index, BIT_ULL(0));
        if (ret == -ENOIOCTLCMD)
                ret = 0;
        if (ret)