linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] staging: media: tegra-video: move tegra210_csi_soc declaration to csi.h
@ 2025-12-29  7:01 Sun Jian
  2025-12-31  9:29 ` Luca Ceresoli
                   ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Sun Jian @ 2025-12-29  7:01 UTC (permalink / raw)
  To: Thierry Reding
  Cc: Jonathan Hunter, Sowjanya Komatineni, Luca Ceresoli,
	Mauro Carvalho Chehab, Greg Kroah-Hartman, linux-media,
	linux-tegra, linux-staging, linux-kernel, Sun Jian

Sparse warns that tegra210_csi_soc is not declared in tegra210.c.
The symbol is referenced from csi.c, so it must remain global. Move the
declaration to csi.h so users see it via the header and avoid extern
declarations in .c files.

No functional change intended.

Signed-off-by: Sun Jian <sun.jian.kdev@gmail.com>
---
 drivers/staging/media/tegra-video/csi.c | 4 ----
 drivers/staging/media/tegra-video/csi.h | 4 ++++
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/media/tegra-video/csi.c b/drivers/staging/media/tegra-video/csi.c
index 604185c00a1a..3c3f6e3fd1ec 100644
--- a/drivers/staging/media/tegra-video/csi.c
+++ b/drivers/staging/media/tegra-video/csi.c
@@ -835,10 +835,6 @@ static void tegra_csi_remove(struct platform_device *pdev)
 	pm_runtime_disable(&pdev->dev);
 }
 
-#if defined(CONFIG_ARCH_TEGRA_210_SOC)
-extern const struct tegra_csi_soc tegra210_csi_soc;
-#endif
-
 static const struct of_device_id tegra_csi_of_id_table[] = {
 #if defined(CONFIG_ARCH_TEGRA_210_SOC)
 	{ .compatible = "nvidia,tegra210-csi", .data = &tegra210_csi_soc },
diff --git a/drivers/staging/media/tegra-video/csi.h b/drivers/staging/media/tegra-video/csi.h
index 3e6e5ee1bb1e..609c5952e050 100644
--- a/drivers/staging/media/tegra-video/csi.h
+++ b/drivers/staging/media/tegra-video/csi.h
@@ -130,6 +130,10 @@ struct tegra_csi_soc {
 	unsigned int tpg_frmrate_table_size;
 };
 
+#if defined(CONFIG_ARCH_TEGRA_210_SOC)
+extern const struct tegra_csi_soc tegra210_csi_soc;
+#endif
+
 /**
  * struct tegra_csi - NVIDIA Tegra CSI device structure
  *
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2026-01-05 15:44 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-12-29  7:01 [PATCH] staging: media: tegra-video: move tegra210_csi_soc declaration to csi.h Sun Jian
2025-12-31  9:29 ` Luca Ceresoli
2025-12-31 12:39 ` [PATCH v2 0/2] staging: media: tegra-video: clean up shared SoC declarations Sun Jian
2025-12-31 12:39   ` [PATCH v2 1/2] staging: media: tegra-video: move tegra210_csi_soc declaration to csi.h Sun Jian
2025-12-31 14:01     ` Luca Ceresoli
2025-12-31 12:39   ` [PATCH v2 2/2] staging: media: tegra-video: move tegra20_vip_soc declaration to vip.h Sun Jian
2025-12-31 14:01     ` Luca Ceresoli
2026-01-02 11:44 ` [PATCH v3 0/2] staging: media: tegra-video: move shared SoC declarations to headers Sun Jian
2026-01-02 11:45   ` [PATCH v3 1/2] staging: media: tegra-video: move tegra210_csi_soc declaration to csi.h Sun Jian
2026-01-02 11:45   ` [PATCH v3 2/2] staging: media: tegra-video: move tegra20_vip_soc declaration to vip.h Sun Jian
2026-01-02 15:53   ` [PATCH v3 0/2] staging: media: tegra-video: move shared SoC declarations to headers Luca Ceresoli
2026-01-05 15:43     ` sun jian

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).