From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julien Grall Subject: [PATCH 4/6] xen/arm: device: Move device_type in init section Date: Fri, 16 Jan 2015 16:20:46 +0000 Message-ID: <1421425248-8727-5-git-send-email-julien.grall@linaro.org> References: <1421425248-8727-1-git-send-email-julien.grall@linaro.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1YC9eH-00065n-JH for xen-devel@lists.xenproject.org; Fri, 16 Jan 2015 16:21:25 +0000 Received: by mail-wi0-f173.google.com with SMTP id r20so3486891wiv.0 for ; Fri, 16 Jan 2015 08:21:24 -0800 (PST) In-Reply-To: <1421425248-8727-1-git-send-email-julien.grall@linaro.org> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel@lists.xenproject.org Cc: stefano.stabellini@citrix.com, Julien Grall , tim@xen.org, ian.campbell@citrix.com List-Id: xen-devel@lists.xenproject.org The function is calling device_is_compatible which lies in init section and is only called during Xen boot. Signed-off-by: Julien Grall --- xen/arch/arm/device.c | 2 +- xen/include/asm-arm/device.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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 \ -- 2.1.4