diff options
author | Thierry Reding <treding@nvidia.com> | 2017-08-23 11:25:08 +0200 |
---|---|---|
committer | Arnd Bergmann <arnd@arndb.de> | 2017-08-23 11:54:10 +0200 |
commit | 226cff485c803ac0f3a6bc52b9b638eb2c41181c (patch) | |
tree | 93fe1d18195ce71f7ee97d8e6a43f9b55ce3fb2f /drivers/soc | |
parent | Merge tag 'sunxi-drivers-for-4.14' of https://git.kernel.org/pub/scm/linux/ke... (diff) | |
download | linux-226cff485c803ac0f3a6bc52b9b638eb2c41181c.tar.xz linux-226cff485c803ac0f3a6bc52b9b638eb2c41181c.zip |
soc/tegra: Restrict SoC device registration to Tegra
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.
Fixes: 8a46828e623c ("soc/tegra: Register SoC device")
Reported-by: Sudeep Holla <sudeep.holla@arm.com>
Tested-by: Sudeep Holla <sudeep.holla@arm.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'drivers/soc')
-rw-r--r-- | drivers/soc/tegra/fuse/fuse-tegra.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/soc/tegra/fuse/fuse-tegra.c b/drivers/soc/tegra/fuse/fuse-tegra.c index e4f78de8f95f..be003d04383f 100644 --- a/drivers/soc/tegra/fuse/fuse-tegra.c +++ b/drivers/soc/tegra/fuse/fuse-tegra.c @@ -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)); |