From patchwork Mon Nov 21 10:48:29 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dave Martin X-Patchwork-Id: 5229 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 0928E23E03 for ; Mon, 21 Nov 2011 10:48:55 +0000 (UTC) Received: from mail-fx0-f52.google.com (mail-fx0-f52.google.com [209.85.161.52]) by fiordland.canonical.com (Postfix) with ESMTP id EBC3DA183DD for ; Mon, 21 Nov 2011 10:48:54 +0000 (UTC) Received: by faaa26 with SMTP id a26so10550775faa.11 for ; Mon, 21 Nov 2011 02:48:54 -0800 (PST) Received: by 10.152.162.10 with SMTP id xw10mr8536376lab.12.1321872534730; Mon, 21 Nov 2011 02:48:54 -0800 (PST) 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.41.198 with SMTP id h6cs111506lal; Mon, 21 Nov 2011 02:48:54 -0800 (PST) Received: by 10.227.198.149 with SMTP id eo21mr4876605wbb.4.1321872532705; Mon, 21 Nov 2011 02:48:52 -0800 (PST) Received: from mail-ww0-f50.google.com (mail-ww0-f50.google.com [74.125.82.50]) by mx.google.com with ESMTPS id v29si4382404weq.92.2011.11.21.02.48.52 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 21 Nov 2011 02:48:52 -0800 (PST) Received-SPF: neutral (google.com: 74.125.82.50 is neither permitted nor denied by best guess record for domain of dave.martin@linaro.org) client-ip=74.125.82.50; Authentication-Results: mx.google.com; spf=neutral (google.com: 74.125.82.50 is neither permitted nor denied by best guess record for domain of dave.martin@linaro.org) smtp.mail=dave.martin@linaro.org Received: by mail-ww0-f50.google.com with SMTP id 14so9540567wwg.31 for ; Mon, 21 Nov 2011 02:48:52 -0800 (PST) Received: by 10.227.206.143 with SMTP id fu15mr8446085wbb.16.1321872532088; Mon, 21 Nov 2011 02:48:52 -0800 (PST) Received: from e103592.peterhouse.linaro.org (fw-lnat.cambridge.arm.com. [217.140.96.63]) by mx.google.com with ESMTPS id w27sm12269454wbm.14.2011.11.21.02.48.50 (version=SSLv3 cipher=OTHER); Mon, 21 Nov 2011 02:48:51 -0800 (PST) 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: Mon, 21 Nov 2011 10:48:29 +0000 Message-Id: <1321872510-2562-2-git-send-email-dave.martin@linaro.org> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1321872510-2562-1-git-send-email-dave.martin@linaro.org> References: <1321872510-2562-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 */