From patchwork Fri Jan 16 16:20:46 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Grall X-Patchwork-Id: 43255 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wg0-f69.google.com (mail-wg0-f69.google.com [74.125.82.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 2EE0B240BA for ; Fri, 16 Jan 2015 16:23:16 +0000 (UTC) Received: by mail-wg0-f69.google.com with SMTP id x12sf11630058wgg.0 for ; Fri, 16 Jan 2015 08:23:15 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:date:message-id:in-reply-to :references:cc:subject:precedence:list-id:list-unsubscribe:list-post :list-help:list-subscribe:mime-version:content-type :content-transfer-encoding:sender:errors-to:x-original-sender :x-original-authentication-results:mailing-list:list-archive; bh=Zs6w3QTpFbLdYHXHJBykj8W1H31ooCR+MCmbpaUa5Sk=; b=J/kA6eK/vk4gk17O7pI859bK0B69v0JSy9Udx8U3mZ+PkTyHhWNkABNnIQN1hzzr93 SGZsmGg20x0eX8kv+ioHT3Vkw+f5v1kddjDpDm83wLVdhLghL9FIcK8VB1wyNHKrwp3n J8h9n9ayWeBa1OQYSMcRcwmjm/lCk9qx5sqeT+cUqCQY6S+c/qbl4xq6UGWSYdQAhY9p oJpjqrRamcuuAGNkx5ALa6BtG4XLY1trXR2TTxwmEYo0KUpav3pOCK4RQvHZTcB1SGHP pEEB8wm322JaPu0OX1wune9TGqmTBIL1/nQb1bn6h4c7pUaD8/lpxGx3RQiYgMaZfqkL Irvg== X-Gm-Message-State: ALoCoQlEPM8ggNI/12rC4/VDzltj1RavARndvmeZeeS0H2c8sfUIScNGxzCaSvPui9b82cJUNRj/ X-Received: by 10.152.42.196 with SMTP id q4mr388082lal.6.1421425395452; Fri, 16 Jan 2015 08:23:15 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.36.73 with SMTP id o9ls338874laj.65.gmail; Fri, 16 Jan 2015 08:23:15 -0800 (PST) X-Received: by 10.112.205.231 with SMTP id lj7mr13209330lbc.86.1421425395312; Fri, 16 Jan 2015 08:23:15 -0800 (PST) Received: from mail-lb0-f177.google.com (mail-lb0-f177.google.com. [209.85.217.177]) by mx.google.com with ESMTPS id aa1si3472008lbc.24.2015.01.16.08.23.15 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 16 Jan 2015 08:23:15 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.177 as permitted sender) client-ip=209.85.217.177; Received: by mail-lb0-f177.google.com with SMTP id b6so19225444lbj.8 for ; Fri, 16 Jan 2015 08:23:15 -0800 (PST) X-Received: by 10.152.43.103 with SMTP id v7mr16606211lal.29.1421425395200; Fri, 16 Jan 2015 08:23:15 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.9.200 with SMTP id c8csp361533lbb; Fri, 16 Jan 2015 08:23:14 -0800 (PST) X-Received: by 10.140.28.200 with SMTP id 66mr15987490qgz.16.1421425389093; Fri, 16 Jan 2015 08:23:09 -0800 (PST) Received: from lists.xen.org (lists.xen.org. [50.57.142.19]) by mx.google.com with ESMTPS id k95si6493693qgd.72.2015.01.16.08.23.08 (version=TLSv1 cipher=RC4-SHA bits=128/128); Fri, 16 Jan 2015 08:23:09 -0800 (PST) Received-SPF: none (google.com: xen-devel-bounces@lists.xen.org does not designate permitted sender hosts) client-ip=50.57.142.19; Received: from localhost ([127.0.0.1] helo=lists.xen.org) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1YC9eJ-00066x-As; Fri, 16 Jan 2015 16:21:27 +0000 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: from [193.109.254.147] by server-2.bemta-14.messagelabs.com id C6/CE-02957-48A39B45; Fri, 16 Jan 2015 16:21:24 +0000 X-Env-Sender: julien.grall@linaro.org X-Msg-Ref: server-3.tower-27.messagelabs.com!1421425284!16381545!1 X-Originating-IP: [209.85.212.173] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 6.12.5; banners=-,-,- X-VirusChecked: Checked Received: (qmail 22855 invoked from network); 16 Jan 2015 16:21:24 -0000 Received: from mail-wi0-f173.google.com (HELO mail-wi0-f173.google.com) (209.85.212.173) by server-3.tower-27.messagelabs.com with RC4-SHA encrypted SMTP; 16 Jan 2015 16:21:24 -0000 Received: by mail-wi0-f173.google.com with SMTP id r20so3486891wiv.0 for ; Fri, 16 Jan 2015 08:21:24 -0800 (PST) X-Received: by 10.180.84.39 with SMTP id v7mr7956370wiy.5.1421425284008; Fri, 16 Jan 2015 08:21:24 -0800 (PST) Received: from chilopoda.uk.xensource.com. ([185.25.64.249]) by mx.google.com with ESMTPSA id dc1sm3562564wib.18.2015.01.16.08.21.22 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 16 Jan 2015 08:21:22 -0800 (PST) From: Julien Grall To: xen-devel@lists.xenproject.org Date: Fri, 16 Jan 2015 16:20:46 +0000 Message-Id: <1421425248-8727-5-git-send-email-julien.grall@linaro.org> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1421425248-8727-1-git-send-email-julien.grall@linaro.org> References: <1421425248-8727-1-git-send-email-julien.grall@linaro.org> Cc: stefano.stabellini@citrix.com, Julien Grall , tim@xen.org, ian.campbell@citrix.com Subject: [Xen-devel] [PATCH 4/6] xen/arm: device: Move device_type in init section X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Post: , List-Help: , List-Subscribe: , MIME-Version: 1.0 Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: julien.grall@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.177 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Archive: 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 \