]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
staging: media: tegra-video: move tegra20_vip_soc declaration to vip.h
authorSun Jian <sun.jian.kdev@gmail.com>
Fri, 2 Jan 2026 11:45:01 +0000 (19:45 +0800)
committerHans Verkuil <hverkuil+cisco@kernel.org>
Tue, 13 Jan 2026 12:21:04 +0000 (13:21 +0100)
tegra20_vip_soc is shared across translation units but is currently
declared via an extern in vip.c. Move the declaration to vip.h so users get
it via the header and we avoid extern declarations in .c files, matching
the pattern already used by tegra20_vi_soc and tegra210_vi_soc.

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/vip.c
drivers/staging/media/tegra-video/vip.h

index 5ec717f3afd503b1ef7e3690d3f028531c1afa9f..80cd3b1131259b4a78cfe4220da5ff1b24743d9f 100644 (file)
@@ -263,10 +263,6 @@ static void tegra_vip_remove(struct platform_device *pdev)
        pm_runtime_disable(&pdev->dev);
 }
 
-#if defined(CONFIG_ARCH_TEGRA_2x_SOC)
-extern const struct tegra_vip_soc tegra20_vip_soc;
-#endif
-
 static const struct of_device_id tegra_vip_of_id_table[] = {
 #if defined(CONFIG_ARCH_TEGRA_2x_SOC)
        { .compatible = "nvidia,tegra20-vip", .data = &tegra20_vip_soc },
index 32ceaaccbba2335cff78ed5ed3d13915c6d551c0..fdded00447e44b76398996e2df2d5ef536834f69 100644 (file)
@@ -50,6 +50,10 @@ struct tegra_vip_soc {
        const struct tegra_vip_ops *ops;
 };
 
+#if defined(CONFIG_ARCH_TEGRA_2x_SOC)
+extern const struct tegra_vip_soc tegra20_vip_soc;
+#endif
+
 /**
  * struct tegra_vip - NVIDIA Tegra VIP device structure
  *