linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: dave.martin@linaro.org (Dave Martin)
To: linux-arm-kernel@lists.infradead.org
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	[thread overview]
Message-ID: <1317830707-17517-2-git-send-email-dave.martin@linaro.org> (raw)
In-Reply-To: <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
<linux/mod_devicetable.h>.

This patch simple moves struct amba_id to the common header, and
adds the appropriate include in <linux/amba/bus.h>.

Signed-off-by: Dave Martin <dave.martin@linaro.org>
---
 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 <linux/clk.h>
 #include <linux/device.h>
+#include <linux/mod_devicetable.h>
 #include <linux/err.h>
 #include <linux/resource.h>
 #include <linux/regulator/consumer.h>
@@ -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 */
-- 
1.7.4.1

  reply	other threads:[~2011-10-05 16:04 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-05 16:04 [PATCH 00/16] ARM: amba: Enable module alias autogeneration for AMBA drivers Dave Martin
2011-10-05 16:04 ` Dave Martin [this message]
2011-10-05 16:04 ` [PATCH 02/16] ARM: amba: Auto-generate AMBA driver module aliases during modpost Dave Martin
2011-10-05 17:37   ` Pawel Moll
2011-10-05 16:04 ` [PATCH 03/16] hwrng: nomadik: Enable module alias autogeneration for AMBA drivers Dave Martin
2011-10-05 16:04 ` [PATCH 04/16] dmaengine: pl08x: " Dave Martin
2011-10-07  4:33   ` Vinod Koul
2011-10-05 16:04 ` [PATCH 05/16] dmaengine: pl330: " Dave Martin
2011-10-06  5:17   ` Jassi Brar
2011-10-07  4:32     ` Vinod Koul
2011-10-05 16:04 ` [PATCH 06/16] gpio: pl061: " Dave Martin
2011-10-05 16:39   ` Grant Likely
2011-10-05 16:04 ` [PATCH 07/16] input: ambakmi: " Dave Martin
2011-10-06  3:37   ` Dmitry Torokhov
2011-10-05 16:04 ` [PATCH 08/16] mmc: mmci: " Dave Martin
2011-10-05 16:05 ` [PATCH 09/16] rtc: pl030: " Dave Martin
2011-10-05 16:05 ` [PATCH 10/16] rtc: pl031: " Dave Martin
2011-10-05 16:05 ` [PATCH 11/16] spi: pl022: " Dave Martin
2011-10-05 16:39   ` Grant Likely
2011-10-06 17:13   ` Linus Walleij
2011-10-05 16:05 ` [PATCH 12/16] serial: pl010: " Dave Martin
2011-10-05 16:05 ` [PATCH 13/16] serial: pl011: " Dave Martin
2011-10-05 16:05 ` [PATCH 14/16] fbdev: amba: " Dave Martin
2011-10-05 16:05 ` [PATCH 15/16] watchdog: sp805: " Dave Martin
2011-10-05 16:05 ` [PATCH 16/16] sound: aaci: " Dave Martin
2011-10-13 16:54 ` [PATCH 00/16] ARM: amba: " Dave Martin
2011-10-13 17:24   ` Russell King - ARM Linux
2011-10-14  9:27     ` Dave Martin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1317830707-17517-2-git-send-email-dave.martin@linaro.org \
    --to=dave.martin@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).