diff mbox

[Xen-devel,4/6] xen/arm: device: Move device_type in init section

Message ID 1421425248-8727-5-git-send-email-julien.grall@linaro.org
State New
Headers show

Commit Message

Julien Grall Jan. 16, 2015, 4:20 p.m. UTC
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(-)
diff mbox

Patch

diff --git a/xen/arch/arm/device.c b/xen/arch/arm/device.c
index 59e94c0..3e5c458 100644
--- a/xen/arch/arm/device.c
+++ b/xen/arch/arm/device.c
@@ -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;
 
diff --git a/xen/include/asm-arm/device.h b/xen/include/asm-arm/device.h
index 74a80c6..e23673c 100644
--- a/xen/include/asm-arm/device.h
+++ b/xen/include/asm-arm/device.h
@@ -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           \