]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
staging: media: tegra-video: move tegra210_csi_soc declaration to csi.h
authorSun Jian <sun.jian.kdev@gmail.com>
Fri, 2 Jan 2026 11:45:00 +0000 (19:45 +0800)
committerHans Verkuil <hverkuil+cisco@kernel.org>
Tue, 13 Jan 2026 12:21:04 +0000 (13:21 +0100)
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.

SPARSE: drivers/staging/media/tegra-video/tegra210.c:1214:28: warning:
 symbol 'tegra210_csi_soc' was not declared. Should it be static?

No functional change intended.

Suggested-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Signed-off-by: Sun Jian <sun.jian.kdev@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 604185c00a1a39e34357e3beefa75aa87b0a1189..3c3f6e3fd1ece28e234baa892924724b83a533eb 100644 (file)
@@ -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 },
index 3e6e5ee1bb1e645c2c46ffe105976c12941b7561..609c5952e050d782116b84d677d03af5058c4695 100644 (file)
@@ -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
  *