There are a number of very platform specific compatibles for reserved
memory that the vast majority of people don't need and they waste
196/200 bytes each.
Wrap the platform specific compatibles so that they are only included
if needed.
Signed-off-by: Daniel Palmer <daniel@thingy.jp>
---
drivers/of/platform.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/drivers/of/platform.c b/drivers/of/platform.c
index ba591fbceb56..0e6c2844e542 100644
--- a/drivers/of/platform.c
+++ b/drivers/of/platform.c
@@ -489,12 +489,22 @@ EXPORT_SYMBOL_GPL(of_platform_default_populate);
static const struct of_device_id reserved_mem_matches[] = {
{ .compatible = "phram" },
+#if IS_ENABLED(CONFIG_QCOM_RMTFS_MEM)
{ .compatible = "qcom,rmtfs-mem" },
+#endif
+#if IS_ENABLED(CONFIG_QCOM_COMMAND_DB)
{ .compatible = "qcom,cmd-db" },
+#endif
+#if IS_ENABLED(CONFIG_QCOM_SMEM)
{ .compatible = "qcom,smem" },
+#endif
{ .compatible = "ramoops" },
+#if IS_ENABLED(CONFIG_NVMEM_RMEM)
{ .compatible = "nvmem-rmem" },
+#endif
+#if IS_ENABLED(CONFIG_OPEN_DICE)
{ .compatible = "google,open-dice" },
+#endif
{}
};
--
2.51.0