From patchwork Wed Oct 5 16:04:52 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dave Martin X-Patchwork-Id: 4521 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 C56B423F58 for ; Wed, 5 Oct 2011 16:05:32 +0000 (UTC) Received: from mail-yw0-f52.google.com (mail-yw0-f52.google.com [209.85.213.52]) by fiordland.canonical.com (Postfix) with ESMTP id 95A63A18BC7 for ; Wed, 5 Oct 2011 16:05:32 +0000 (UTC) Received: by ywp31 with SMTP id 31so2470863ywp.11 for ; Wed, 05 Oct 2011 09:05:32 -0700 (PDT) Received: by 10.223.57.17 with SMTP id a17mr1446568fah.65.1317830731860; Wed, 05 Oct 2011 09:05:31 -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.23.170 with SMTP id n10cs97369laf; Wed, 5 Oct 2011 09:05:31 -0700 (PDT) Received: by 10.227.32.130 with SMTP id c2mr3136187wbd.109.1317830729492; Wed, 05 Oct 2011 09:05:29 -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 gd5si1616085wbb.137.2011.10.05.09.05.29 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 05 Oct 2011 09:05:29 -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 wyf23 with SMTP id 23so2179105wyf.37 for ; Wed, 05 Oct 2011 09:05:29 -0700 (PDT) Received: by 10.227.36.229 with SMTP id u37mr3389293wbd.21.1317830728875; Wed, 05 Oct 2011 09:05:28 -0700 (PDT) Received: from e103592.peterhouse.linaro.org (fw-lnat.cambridge.arm.com. [217.140.96.63]) by mx.google.com with ESMTPS id l9sm3682771wba.5.2011.10.05.09.05.27 (version=SSLv3 cipher=OTHER); Wed, 05 Oct 2011 09:05:27 -0700 (PDT) From: Dave Martin To: linux-arm-kernel@lists.infradead.org Cc: patches@linaro.org, =?UTF-8?q?Pawe=C5=82=20Moll?= Subject: [PATCH 01/16] ARM: amba: Move definition of struct amba_id to mod_devicetable.h Date: Wed, 5 Oct 2011 17:04:52 +0100 Message-Id: <1317830707-17517-2-git-send-email-dave.martin@linaro.org> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1317830707-17517-1-git-send-email-dave.martin@linaro.org> References: <1317830707-17517-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 */