]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
staging: media: tegra-video: csi: move CSI helpers to header
authorSvyatoslav Ryhel <clamor95@gmail.com>
Tue, 3 Mar 2026 08:42:27 +0000 (10:42 +0200)
committerHans Verkuil <hverkuil+cisco@kernel.org>
Thu, 19 Mar 2026 07:18:36 +0000 (08:18 +0100)
Move CSI helpers into the header for easier access from SoC-specific video
driver parts.

Tested-by: Luca Ceresoli <luca.ceresoli@bootlin.com> # tegra20, parallel camera
Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
drivers/staging/media/tegra-video/csi.c
drivers/staging/media/tegra-video/csi.h

index 7842104ca933c12937c83e0fbbadcb36b2a9c711..f858c05ce6c9a6676484cd9237d75c40453b4838 100644 (file)
 
 #define MHZ                    1000000
 
-static inline struct tegra_csi *
-host1x_client_to_csi(struct host1x_client *client)
-{
-       return container_of(client, struct tegra_csi, client);
-}
-
-static inline struct tegra_csi_channel *to_csi_chan(struct v4l2_subdev *subdev)
-{
-       return container_of(subdev, struct tegra_csi_channel, subdev);
-}
-
 /*
  * CSI is a separate subdevice which has 6 source pads to generate
  * test pattern. CSI subdevice pad ops are used only for TPG and
index 609c5952e050d782116b84d677d03af5058c4695..2b4d586d3845ea13b78091d98c85d89af4ddeb30 100644 (file)
@@ -155,6 +155,16 @@ struct tegra_csi {
        struct list_head csi_chans;
 };
 
+static inline struct tegra_csi *host1x_client_to_csi(struct host1x_client *client)
+{
+       return container_of(client, struct tegra_csi, client);
+}
+
+static inline struct tegra_csi_channel *to_csi_chan(struct v4l2_subdev *subdev)
+{
+       return container_of(subdev, struct tegra_csi_channel, subdev);
+}
+
 void tegra_csi_error_recover(struct v4l2_subdev *subdev);
 void tegra_csi_calc_settle_time(struct tegra_csi_channel *csi_chan,
                                u8 csi_port_num,