linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: s.hauer@pengutronix.de (Sascha Hauer)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/4] ARM i.MX23/28: deobfuscate gpio initialization
Date: Thu, 27 Jan 2011 12:40:10 +0100	[thread overview]
Message-ID: <1296128413-20778-2-git-send-email-s.hauer@pengutronix.de> (raw)
In-Reply-To: <1296128413-20778-1-git-send-email-s.hauer@pengutronix.de>

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 arch/arm/mach-mxs/gpio.c |   19 ++++++++++---------
 1 files changed, 10 insertions(+), 9 deletions(-)

diff --git a/arch/arm/mach-mxs/gpio.c b/arch/arm/mach-mxs/gpio.c
index d7ad7a6..36df2d7 100644
--- a/arch/arm/mach-mxs/gpio.c
+++ b/arch/arm/mach-mxs/gpio.c
@@ -297,20 +297,17 @@ int __init mxs_gpio_init(struct mxs_gpio_port *port, int cnt)
 		.virtual_irq_start = MXS_GPIO_IRQ_START + (_id) * 32,	\
 	}
 
-#define DEFINE_REGISTER_FUNCTION(prefix)				\
-int __init prefix ## _register_gpios(void)				\
-{									\
-	return mxs_gpio_init(prefix ## _gpio_ports,			\
-			ARRAY_SIZE(prefix ## _gpio_ports));		\
-}
-
 #ifdef CONFIG_SOC_IMX23
 static struct mxs_gpio_port mx23_gpio_ports[] = {
 	DEFINE_MXS_GPIO_PORT(MX23, 0),
 	DEFINE_MXS_GPIO_PORT(MX23, 1),
 	DEFINE_MXS_GPIO_PORT(MX23, 2),
 };
-DEFINE_REGISTER_FUNCTION(mx23)
+
+int __init mx23_register_gpios(void)
+{
+	return mxs_gpio_init(mx23_gpio_ports, ARRAY_SIZE(mx23_gpio_ports));
+}
 #endif
 
 #ifdef CONFIG_SOC_IMX28
@@ -321,5 +318,9 @@ static struct mxs_gpio_port mx28_gpio_ports[] = {
 	DEFINE_MXS_GPIO_PORT(MX28, 3),
 	DEFINE_MXS_GPIO_PORT(MX28, 4),
 };
-DEFINE_REGISTER_FUNCTION(mx28)
+
+int __init mx28_register_gpios(void)
+{
+	return mxs_gpio_init(mx28_gpio_ports, ARRAY_SIZE(mx28_gpio_ports));
+}
 #endif
-- 
1.7.2.3

  reply	other threads:[~2011-01-27 11:40 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-27 11:40 some i.MX23/28 patches Sascha Hauer
2011-01-27 11:40 ` Sascha Hauer [this message]
2011-01-27 11:40 ` [PATCH 2/4] ARM i.MX23/28: do not use complicated macros if not necessary Sascha Hauer
2011-01-27 11:40 ` [PATCH 3/4] ARM i.MX23: remove reserved register defines Sascha Hauer
2011-01-27 11:40 ` [PATCH 4/4] ARM i.MX28: " Sascha Hauer
2011-01-27 13:15 ` some i.MX23/28 patches Sergei Shtylyov
2011-01-27 13:23   ` Sascha Hauer
2011-01-27 17:13 ` Wolfram Sang
2011-01-27 23:15 ` Shawn Guo
2011-01-27 15:19   ` Sascha Hauer

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=1296128413-20778-2-git-send-email-s.hauer@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --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).