Skip to contentSkip to conversation

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

PATCH Applied Thierry Reding 2 participants 2 messages Jun 18, 2021 – Jun 20, 2021 Tegra architecture support

lore
Share & tools
lore
#0 lore raw

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

From: Thierry Reding <[email protected]>

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.

---
 include/soc/tegra/mc.h | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
include/soc/tegra/mc.h +7 -2
index e19c2504a14b..1066b1194a5a 100644
@@ -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__ */
Signature · 1 line
2.32.0
#1 lore raw
Quoted 3 lines · Thierry Reding

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,

Signature · 1 line
Krzysztof Kozlowski <[email protected]>