]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
media: rcar-csi2: Use v4l2_subdev_{enable|disable}_streams()
authorTomi Valkeinen <tomi.valkeinen+renesas@ideasonboard.com>
Mon, 20 Jan 2025 13:10:40 +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-csi2.c

index 84e6194fed6c4717bb5b4b13183ab9ae68d6e843..ff27a88459699c8170fa2426bfeecc71b61df8f1 100644 (file)
@@ -1577,7 +1577,8 @@ static int rcsi2_start(struct rcar_csi2 *priv, struct v4l2_subdev_state *state)
                return ret;
        }
 
-       ret = v4l2_subdev_call(priv->remote, video, s_stream, 1);
+       ret = v4l2_subdev_enable_streams(priv->remote, priv->remote_pad,
+                                        BIT_ULL(0));
        if (ret) {
                rcsi2_enter_standby(priv);
                return ret;
@@ -1589,7 +1590,7 @@ static int rcsi2_start(struct rcar_csi2 *priv, struct v4l2_subdev_state *state)
 static void rcsi2_stop(struct rcar_csi2 *priv)
 {
        rcsi2_enter_standby(priv);
-       v4l2_subdev_call(priv->remote, video, s_stream, 0);
+       v4l2_subdev_disable_streams(priv->remote, priv->remote_pad, BIT_ULL(0));
 }
 
 static int rcsi2_s_stream(struct v4l2_subdev *sd, int enable)