From: Sun Jian Date: Fri, 2 Jan 2026 11:45:01 +0000 (+0800) Subject: staging: media: tegra-video: move tegra20_vip_soc declaration to vip.h X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=597f8851c9343aad7c070818f20c61aab5fb74f0;p=thirdparty%2Fkernel%2Flinux.git staging: media: tegra-video: move tegra20_vip_soc declaration to vip.h 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 Signed-off-by: Sun Jian Signed-off-by: Hans Verkuil --- diff --git a/drivers/staging/media/tegra-video/vip.c b/drivers/staging/media/tegra-video/vip.c index 5ec717f3afd50..80cd3b1131259 100644 --- a/drivers/staging/media/tegra-video/vip.c +++ b/drivers/staging/media/tegra-video/vip.c @@ -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 }, diff --git a/drivers/staging/media/tegra-video/vip.h b/drivers/staging/media/tegra-video/vip.h index 32ceaaccbba23..fdded00447e44 100644 --- a/drivers/staging/media/tegra-video/vip.h +++ b/drivers/staging/media/tegra-video/vip.h @@ -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 *