diff mbox series

memory: tegra: Add compile-test stub for tegra_mc_probe_device()

Message ID 20210618111846.1286166-1-thierry.reding@gmail.com (mailing list archive)
State New, archived
Headers show
Series memory: tegra: Add compile-test stub for tegra_mc_probe_device() | expand

Commit Message

Thierry Reding June 18, 2021, 11:18 a.m. UTC
From: Thierry Reding <treding@nvidia.com>

The tegra_mc_probe_device() symbol is only available when the TEGRA_MC
Kconfig option is enabled. Provide a stub if that's not the case so that
the driver can be compile-tested.

Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
---
 include/soc/tegra/mc.h | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

Comments

Krzysztof Kozlowski June 20, 2021, 7:23 p.m. UTC | #1
On Fri, 18 Jun 2021 13:18:46 +0200, Thierry Reding wrote:
> The tegra_mc_probe_device() symbol is only available when the TEGRA_MC
> Kconfig option is enabled. Provide a stub if that's not the case so that
> the driver can be compile-tested.

Applied, thanks!

[1/1] memory: tegra: Add compile-test stub for tegra_mc_probe_device()
      commit: 47661ee1821fc3a6b5ae07aac37410d6ccada976

Best regards,
diff mbox series

Patch

diff --git a/include/soc/tegra/mc.h b/include/soc/tegra/mc.h
index e19c2504a14b..1066b1194a5a 100644
--- a/include/soc/tegra/mc.h
+++ b/include/soc/tegra/mc.h
@@ -237,14 +237,19 @@  unsigned int tegra_mc_get_emem_device_count(struct tegra_mc *mc);
 
 #ifdef CONFIG_TEGRA_MC
 struct tegra_mc *devm_tegra_memory_controller_get(struct device *dev);
+int tegra_mc_probe_device(struct tegra_mc *mc, struct device *dev);
 #else
 static inline struct tegra_mc *
 devm_tegra_memory_controller_get(struct device *dev)
 {
 	return ERR_PTR(-ENODEV);
 }
-#endif
 
-int tegra_mc_probe_device(struct tegra_mc *mc, struct device *dev);
+static inline int
+tegra_mc_probe_device(struct tegra_mc *mc, struct device *dev)
+{
+	return -ENODEV;
+}
+#endif
 
 #endif /* __SOC_TEGRA_MC_H__ */