From patchwork Thu May 17 06:46:09 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ike Panhc X-Patchwork-Id: 159833 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from chlorine.canonical.com (chlorine.canonical.com [91.189.94.204]) by ozlabs.org (Postfix) with ESMTP id 137BAB6FDA for ; Thu, 17 May 2012 16:46:27 +1000 (EST) Received: from localhost ([127.0.0.1] helo=chlorine.canonical.com) by chlorine.canonical.com with esmtp (Exim 4.71) (envelope-from ) id 1SUuTZ-0004CG-I8; Thu, 17 May 2012 06:46:17 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by chlorine.canonical.com with esmtp (Exim 4.71) (envelope-from ) id 1SUuTW-0004Bx-Bm for kernel-team@lists.ubuntu.com; Thu, 17 May 2012 06:46:14 +0000 Received: from [210.242.151.101] (helo=canonical.com) by youngberry.canonical.com with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1SUuTV-00053J-EE for kernel-team@lists.ubuntu.com; Thu, 17 May 2012 06:46:14 +0000 From: Ike Panhc To: kernel-team@lists.ubuntu.com Subject: [PATCH 13/18] ARM: amba: Move definition of struct amba_id to mod_devicetable.h Date: Thu, 17 May 2012 14:46:09 +0800 Message-Id: <1337237169-3744-1-git-send-email-ike.pan@canonical.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1337236878-3255-1-git-send-email-ike.pan@canonical.com> References: <1337236878-3255-1-git-send-email-ike.pan@canonical.com> X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.13 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: kernel-team-bounces@lists.ubuntu.com Errors-To: kernel-team-bounces@lists.ubuntu.com From: Dave Martin 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 (cherry picked from commit 1e5f9a23430e64fb56d9d5d8e1ca165ba1cfeb75) Signed-off-by: Ike Panhc --- 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 */