@@ -67,7 +67,7 @@ int __init device_init(struct dt_device_node *dev, enum device_type type,
return -EBADF;
}
-enum device_type device_get_type(const struct dt_device_node *dev)
+enum device_type __init device_get_type(const struct dt_device_node *dev)
{
const struct device_desc *desc;
@@ -41,7 +41,7 @@ int __init device_init(struct dt_device_node *dev, enum device_type type,
*
* Return the device type on success or DEVICE_ANY on failure
*/
-enum device_type device_get_type(const struct dt_device_node *dev);
+enum device_type __init device_get_type(const struct dt_device_node *dev);
#define DT_DEVICE_START(_name, _namestr, _type) \
static const struct device_desc __dev_desc_##_name __used \
The function is calling device_is_compatible which lies in init section and is only called during Xen boot. Signed-off-by: Julien Grall <julien.grall@linaro.org> --- xen/arch/arm/device.c | 2 +- xen/include/asm-arm/device.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)