hw/core: Move compat_props_add() to 'hw/core/boards.h'
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> Reviewed-by: Michael Tokarev <mjt@tls.msk.ru> Message-Id: <20260325151728.45378-3-philmd@linaro.org>
This commit is contained in:
@@ -803,6 +803,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_11_0[];
|
||||
extern const size_t hw_compat_11_0_len;
|
||||
|
||||
|
||||
@@ -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. ***/
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user