compat_props_add() is only used by board models, no need
to expose it to any device model. Restrict by defining it
only in "hw/core/boards.h".
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
include/hw/core/boards.h | 10 ++++++++++
include/hw/core/qdev.h | 10 ----------
2 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/include/hw/core/boards.h b/include/hw/core/boards.h
index f85f31bd90d..b7138f2715e 100644
--- a/include/hw/core/boards.h
+++ b/include/hw/core/boards.h
@@ -804,6 +804,16 @@ struct MachineState {
} \
} while (0)
+static inline void
+compat_props_add(GPtrArray *arr,
+ GlobalProperty props[], size_t nelem)
+{
+ int i;
+ for (i = 0; i < nelem; i++) {
+ g_ptr_array_add(arr, (void *)&props[i]);
+ }
+}
+
extern GlobalProperty hw_compat_10_2[];
extern const size_t hw_compat_10_2_len;
diff --git a/include/hw/core/qdev.h b/include/hw/core/qdev.h
index f99a8979ccb..778617787c7 100644
--- a/include/hw/core/qdev.h
+++ b/include/hw/core/qdev.h
@@ -421,16 +421,6 @@ typedef struct GlobalProperty {
bool optional;
} GlobalProperty;
-static inline void
-compat_props_add(GPtrArray *arr,
- GlobalProperty props[], size_t nelem)
-{
- int i;
- for (i = 0; i < nelem; i++) {
- g_ptr_array_add(arr, (void *)&props[i]);
- }
-}
-
/*** Board API. This should go away once we have a machine config file. ***/
/**
--
2.53.0