From patchwork Fri Jan 16 14:23:59 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Grall X-Patchwork-Id: 43238 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f198.google.com (mail-wi0-f198.google.com [209.85.212.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id C007F240D8 for ; Fri, 16 Jan 2015 14:25:58 +0000 (UTC) Received: by mail-wi0-f198.google.com with SMTP id bs8sf2137809wib.1 for ; Fri, 16 Jan 2015 06:25:58 -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=1R8Tc1WjJYalEvSyX/FfPULSgRvLmZDZagqCyibZjMo=; b=aletBQDWu43UDIGhctvXdwj09g2eaBhWcT5K2NUS/J67kpvzu/IqGsDY8Vf+I1ne2/ MOxi+xhjLeKeFzlUGGKEtcQPnDWqMQsphOfUbmzObSpoO/7OBK96FA3BWt1eBYcmkkyc ZL/OsM9f2GYRCSBVDr9pUY2PJZxwcSdeTza9cNvqzMxT8x8yPMZFSu+VewaL7tubuLBq ZM1t0JHS4xRv0KV6g23fT1gSyJnwbdqakz5FQoxApxmmGD8jgRptDOI7kgccBAvkj3II w8dRb4cxQuw6zvWlECbyeM+a9miqqMajzsjiHpoD0ry4G1DJAfZaIiUTHC6mp3oxvzWv CTyw== X-Gm-Message-State: ALoCoQmsTJHW6wTkZCZh/obPy0+PAY0/sLJALBXVzpvaOlfhe2scFFXhS3TBrj3v0OtVvxQtW0IC X-Received: by 10.181.13.147 with SMTP id ey19mr480293wid.2.1421418358100; Fri, 16 Jan 2015 06:25:58 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.88.70 with SMTP id be6ls365893lab.42.gmail; Fri, 16 Jan 2015 06:25:57 -0800 (PST) X-Received: by 10.112.52.229 with SMTP id w5mr15933592lbo.52.1421418357943; Fri, 16 Jan 2015 06:25:57 -0800 (PST) Received: from mail-la0-f43.google.com (mail-la0-f43.google.com. [209.85.215.43]) by mx.google.com with ESMTPS id rz1si3187371lbb.42.2015.01.16.06.25.57 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 16 Jan 2015 06:25:57 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.43 as permitted sender) client-ip=209.85.215.43; Received: by mail-la0-f43.google.com with SMTP id q1so3791812lam.2 for ; Fri, 16 Jan 2015 06:25:57 -0800 (PST) X-Received: by 10.112.41.234 with SMTP id i10mr16142237lbl.25.1421418357821; Fri, 16 Jan 2015 06:25:57 -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 c8csp325186lbb; Fri, 16 Jan 2015 06:25:56 -0800 (PST) X-Received: by 10.224.89.2 with SMTP id c2mr25130389qam.75.1421418355804; Fri, 16 Jan 2015 06:25:55 -0800 (PST) Received: from lists.xen.org (lists.xen.org. [50.57.142.19]) by mx.google.com with ESMTPS id 15si6030579qgt.127.2015.01.16.06.25.55 (version=TLSv1 cipher=RC4-SHA bits=128/128); Fri, 16 Jan 2015 06:25:55 -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 1YC7pd-0004IE-Le; Fri, 16 Jan 2015 14:25:01 +0000 Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1YC7pb-0004Gz-Na for xen-devel@lists.xenproject.org; Fri, 16 Jan 2015 14:24:59 +0000 Received: from [85.158.137.68] by server-7.bemta-3.messagelabs.com id 63/6A-17958-A3F19B45; Fri, 16 Jan 2015 14:24:58 +0000 X-Env-Sender: julien.grall@linaro.org X-Msg-Ref: server-2.tower-31.messagelabs.com!1421418298!20133425!1 X-Originating-IP: [209.85.212.169] 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 6252 invoked from network); 16 Jan 2015 14:24:58 -0000 Received: from mail-wi0-f169.google.com (HELO mail-wi0-f169.google.com) (209.85.212.169) by server-2.tower-31.messagelabs.com with RC4-SHA encrypted SMTP; 16 Jan 2015 14:24:58 -0000 Received: by mail-wi0-f169.google.com with SMTP id bs8so4711087wib.0 for ; Fri, 16 Jan 2015 06:24:58 -0800 (PST) X-Received: by 10.180.91.79 with SMTP id cc15mr6774653wib.2.1421418297921; Fri, 16 Jan 2015 06:24:57 -0800 (PST) Received: from chilopoda.uk.xensource.com. ([185.25.64.249]) by mx.google.com with ESMTPSA id x6sm6270862wjf.24.2015.01.16.06.24.56 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 16 Jan 2015 06:24:56 -0800 (PST) From: Julien Grall To: xen-devel@lists.xenproject.org Date: Fri, 16 Jan 2015 14:23:59 +0000 Message-Id: <1421418247-30068-5-git-send-email-julien.grall@linaro.org> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1421418247-30068-1-git-send-email-julien.grall@linaro.org> References: <1421418247-30068-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 v2 04/12] xen/arm: device: Rename device_type into device_match 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.215.43 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: This enum was used for matching a specific device and not to get the type of device. Hence the name device_type will be used for another purpose later. Signed-off-by: Julien Grall --- xen/arch/arm/device.c | 4 ++-- xen/include/asm-arm/device.h | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/xen/arch/arm/device.c b/xen/arch/arm/device.c index 59e94c0..693b9af 100644 --- a/xen/arch/arm/device.c +++ b/xen/arch/arm/device.c @@ -40,7 +40,7 @@ static bool_t __init device_is_compatible(const struct device_desc *desc, return 0; } -int __init device_init(struct dt_device_node *dev, enum device_type type, +int __init device_init(struct dt_device_node *dev, enum device_match type, const void *data) { const struct device_desc *desc; @@ -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_match 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..72a9028 100644 --- a/xen/include/asm-arm/device.h +++ b/xen/include/asm-arm/device.h @@ -4,7 +4,7 @@ #include #include -enum device_type +enum device_match { DEVICE_SERIAL, DEVICE_IOMMU, @@ -17,7 +17,7 @@ struct device_desc { /* Device name */ const char *name; /* Device type */ - enum device_type type; + enum device_match type; /* Array of device tree 'compatible' strings */ const char *const *compatible; /* Device initialization */ @@ -32,7 +32,7 @@ struct device_desc { * * Return 0 on success. */ -int __init device_init(struct dt_device_node *dev, enum device_type type, +int __init device_init(struct dt_device_node *dev, enum device_match type, const void *data); /** @@ -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_match 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 \