diff options
| author | Svyatoslav Ryhel <clamor95@gmail.com> | 2026-03-03 11:42:27 +0300 |
|---|---|---|
| committer | Hans Verkuil <hverkuil+cisco@kernel.org> | 2026-03-19 10:18:36 +0300 |
| commit | 6926495fa5204fa50f164c92bb63a303e0a829ff (patch) | |
| tree | 19da84121eda2f8fa62d44410bf438abbfe861b2 | |
| parent | 4c9f5dc5210b0cbcf5582c8e1484659da376807f (diff) | |
| download | linux-6926495fa5204fa50f164c92bb63a303e0a829ff.tar.xz | |
staging: media: tegra-video: csi: move CSI helpers to header
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>
| -rw-r--r-- | drivers/staging/media/tegra-video/csi.c | 11 | ||||
| -rw-r--r-- | drivers/staging/media/tegra-video/csi.h | 10 |
2 files changed, 10 insertions, 11 deletions
diff --git a/drivers/staging/media/tegra-video/csi.c b/drivers/staging/media/tegra-video/csi.c index 7842104ca933..f858c05ce6c9 100644 --- a/drivers/staging/media/tegra-video/csi.c +++ b/drivers/staging/media/tegra-video/csi.c @@ -20,17 +20,6 @@ #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 diff --git a/drivers/staging/media/tegra-video/csi.h b/drivers/staging/media/tegra-video/csi.h index 609c5952e050..2b4d586d3845 100644 --- a/drivers/staging/media/tegra-video/csi.h +++ b/drivers/staging/media/tegra-video/csi.h @@ -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, |
