soc/tegra: Restrict SoC device registration to Tegra
PATCH 1/2 soc/tegra: Restrict SoC device registration to Tegra
From: Thierry Reding <[email protected]>
Commit 8a46828e623c ("soc/tegra: Register SoC device") added an initcall to register the SoC device on Tegra. However, that code is unrestricted and will run on all platforms, causing unwanted warnings.
Fix this by first checking that we're running on hardware that supports the fuses block that we use to provide SoC information.
--- drivers/soc/tegra/fuse/fuse-tegra.c | 8 ++++++++ 1 file changed, 8 insertions(+)
drivers/soc/tegra/fuse/fuse-tegra.c +8 -0
@@ -346,8 +346,16 @@ early_initcall(tegra_init_fuse);#ifdef CONFIG_ARM64 static int __init tegra_init_soc (void ) { +struct device_node *np;struct device *soc; +/* make sure we're running on Tegra */ + np =of_find_matching_node (NULL , tegra_fuse_match); +if (!np) +return 0 ; + +of_node_put (np); + soc =tegra_soc_device_register ();if (IS_ERR (soc)) {pr_err ("failed to register SoC device: %ld\n" ,PTR_ERR (soc));
Signature · 1 line
2.13.3
PATCH 2/2 soc/tegra: fuse: Add missing semi-colon
From: Thierry Reding <[email protected]>
Commit 8a46828e623c ("soc/tegra: Register SoC device") added a new initcall, but forgot to terminate the line with a semi-colon. Some recent versions of GCC seem to report this as an error.
--- drivers/soc/tegra/fuse/fuse-tegra.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/soc/tegra/fuse/fuse-tegra.c +1 -1
@@ -364,5 +364,5 @@ static int __init tegra_init_soc(void) return 0; } -device_initcall(tegra_init_soc) +device_initcall (tegra_init_soc);#endif
Signature · 1 line
2.13.3
Arnd Bergmann
AppliedPATCH 2/2 soc/tegra: fuse: Add missing semi-colon
Quoted 9 lines · Thierry Reding
From: Thierry Reding <[email protected]>
Commit
8a46828e623c("soc/tegra: Register SoC device") added a new initcall, but forgot to terminate the line with a semi-colon. Some recent versions of GCC seem to report this as an error.Fixes 8a46828e623c ("soc/tegra: Register SoC device")Reported-by Arnd Bergmann <[email protected]>Signed-off-by Thierry Reding <[email protected]>
Applied patches 1 and 2, thanks for addressing this so quickly!
Arnd