From patchwork Fri Oct 14 10:04:50 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dave Martin X-Patchwork-Id: 4679 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 8E78623EFA for ; Fri, 14 Oct 2011 10:05:11 +0000 (UTC) Received: from mail-gx0-f180.google.com (mail-gx0-f180.google.com [209.85.161.180]) by fiordland.canonical.com (Postfix) with ESMTP id 5E5B4A18777 for ; Fri, 14 Oct 2011 10:05:11 +0000 (UTC) Received: by ggni2 with SMTP id i2so1371816ggn.11 for ; Fri, 14 Oct 2011 03:05:10 -0700 (PDT) Received: by 10.223.17.3 with SMTP id q3mr3141808faa.28.1318586710517; Fri, 14 Oct 2011 03:05:10 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.152.24.41 with SMTP id r9cs8405laf; Fri, 14 Oct 2011 03:05:09 -0700 (PDT) Received: by 10.227.59.146 with SMTP id l18mr11143wbh.66.1318586709034; Fri, 14 Oct 2011 03:05:09 -0700 (PDT) Received: from mail-wy0-f178.google.com (mail-wy0-f178.google.com [74.125.82.178]) by mx.google.com with ESMTPS id ge4si5545354wbb.85.2011.10.14.03.05.08 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 14 Oct 2011 03:05:09 -0700 (PDT) Received-SPF: neutral (google.com: 74.125.82.178 is neither permitted nor denied by best guess record for domain of dave.martin@linaro.org) client-ip=74.125.82.178; Authentication-Results: mx.google.com; spf=neutral (google.com: 74.125.82.178 is neither permitted nor denied by best guess record for domain of dave.martin@linaro.org) smtp.mail=dave.martin@linaro.org Received: by wyf28 with SMTP id 28so417638wyf.37 for ; Fri, 14 Oct 2011 03:05:08 -0700 (PDT) Received: by 10.216.221.212 with SMTP id r62mr2503647wep.73.1318586708146; Fri, 14 Oct 2011 03:05:08 -0700 (PDT) Received: from e103592.peterhouse.linaro.org (fw-lnat.cambridge.arm.com. [217.140.96.63]) by mx.google.com with ESMTPS id g20sm13249463wbp.13.2011.10.14.03.05.06 (version=SSLv3 cipher=OTHER); Fri, 14 Oct 2011 03:05:07 -0700 (PDT) From: Dave Martin To: linux-kernel@vger.kernel.org Cc: patches@linaro.org, linux-arm-kernel@lists.infradead.org, Dave Martin Subject: [PATCH 1/2] ARM: amba: Move definition of struct amba_id to mod_devicetable.h Date: Fri, 14 Oct 2011 11:04:50 +0100 Message-Id: <1318586691-3833-2-git-send-email-dave.martin@linaro.org> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1318586691-3833-1-git-send-email-dave.martin@linaro.org> References: <1318586691-3833-1-git-send-email-dave.martin@linaro.org> The general kernel infrastructure for adding module alises during module post processing expects the affected device type identification structures in a common header . This patch simple moves struct amba_id to the common header, and adds the appropriate include in . Signed-off-by: Dave Martin --- include/linux/amba/bus.h | 7 +------ include/linux/mod_devicetable.h | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+), 6 deletions(-) diff --git a/include/linux/amba/bus.h b/include/linux/amba/bus.h index fcbbe71..724c69c 100644 --- a/include/linux/amba/bus.h +++ b/include/linux/amba/bus.h @@ -16,6 +16,7 @@ #include #include +#include #include #include #include @@ -35,12 +36,6 @@ struct amba_device { unsigned int irq[AMBA_NR_IRQS]; }; -struct amba_id { - unsigned int id; - unsigned int mask; - void *data; -}; - struct amba_driver { struct device_driver drv; int (*probe)(struct amba_device *, const struct amba_id *); diff --git a/include/linux/mod_devicetable.h b/include/linux/mod_devicetable.h index 468819c..83ac071 100644 --- a/include/linux/mod_devicetable.h +++ b/include/linux/mod_devicetable.h @@ -542,4 +542,22 @@ struct isapnp_device_id { kernel_ulong_t driver_data; /* data private to the driver */ }; +/** + * struct amba_id - identifies a device on an AMBA bus + * @id: The significant bits if the hardware device ID + * @mask: Bitmask specifying which bits of the id field are significant when + * matching. A driver binds to a device when ((hardware device ID) & mask) + * == id. + * @data: Private data used by the driver. + */ +struct amba_id { + unsigned int id; + unsigned int mask; +#ifndef __KERNEL__ + kernel_ulong_t data; +#else + void *data; +#endif +}; + #endif /* LINUX_MOD_DEVICETABLE_H */