linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: prabhakar.csengg@gmail.com (Lad, Prabhakar)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v3 1/7] gpio: davinci: coding style correction
Date: Sun, 18 Aug 2013 10:48:57 +0530	[thread overview]
Message-ID: <1376803143-13738-2-git-send-email-prabhakar.csengg@gmail.com> (raw)
In-Reply-To: <1376803143-13738-1-git-send-email-prabhakar.csengg@gmail.com>

From: Philip Avinash <avinashphilip@ti.com>

Make some minor coding style fixes. Use proper multi-line
commenting style, arrange include files alphabetically and
use a macro for register offset.

Signed-off-by: Philip Avinash <avinashphilip@ti.com>
[nsekhar at ti.com: dropped changes which were considered
churn - line break fixes and variable name changes]
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
---
 drivers/gpio/gpio-davinci.c |   20 ++++++++++++--------
 1 file changed, 12 insertions(+), 8 deletions(-)

diff --git a/drivers/gpio/gpio-davinci.c b/drivers/gpio/gpio-davinci.c
index 17df6db..af7ea0b 100644
--- a/drivers/gpio/gpio-davinci.c
+++ b/drivers/gpio/gpio-davinci.c
@@ -9,12 +9,11 @@
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version.
  */
-#include <linux/gpio.h>
-#include <linux/errno.h>
-#include <linux/kernel.h>
 #include <linux/clk.h>
-#include <linux/err.h>
+#include <linux/errno.h>
+#include <linux/gpio.h>
 #include <linux/io.h>
+#include <linux/kernel.h>
 
 #include <asm/mach/irq.h>
 
@@ -31,6 +30,8 @@ struct davinci_gpio_regs {
 	u32	intstat;
 };
 
+#define BINTEN	0x8 /* GPIO Interrupt Per-Bank Enable Register */
+
 #define chip2controller(chip)	\
 	container_of(chip, struct davinci_gpio_controller, chip)
 
@@ -304,7 +305,8 @@ static int gpio_to_irq_unbanked(struct gpio_chip *chip, unsigned offset)
 {
 	struct davinci_soc_info *soc_info = &davinci_soc_info;
 
-	/* NOTE:  we assume for now that only irqs in the first gpio_chip
+	/*
+	 * NOTE:  we assume for now that only irqs in the first gpio_chip
 	 * can provide direct-mapped IRQs to AINTC (up to 32 GPIOs).
 	 */
 	if (offset < soc_info->gpio_unbanked)
@@ -368,7 +370,8 @@ static int __init davinci_gpio_irq_setup(void)
 	}
 	clk_prepare_enable(clk);
 
-	/* Arrange gpio_to_irq() support, handling either direct IRQs or
+	/*
+	 * Arrange gpio_to_irq() support, handling either direct IRQs or
 	 * banked IRQs.  Having GPIOs in the first GPIO bank use direct
 	 * IRQs, while the others use banked IRQs, would need some setup
 	 * tweaks to recognize hardware which can do that.
@@ -450,10 +453,11 @@ static int __init davinci_gpio_irq_setup(void)
 	}
 
 done:
-	/* BINTEN -- per-bank interrupt enable. genirq would also let these
+	/*
+	 * BINTEN -- per-bank interrupt enable. genirq would also let these
 	 * bits be set/cleared dynamically.
 	 */
-	__raw_writel(binten, gpio_base + 0x08);
+	__raw_writel(binten, gpio_base + BINTEN);
 
 	printk(KERN_INFO "DaVinci: %d gpio irqs\n", irq - gpio_to_irq(0));
 
-- 
1.7.9.5

  reply	other threads:[~2013-08-18  5:18 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-18  5:18 [PATCH v3 0/7] Convert GPIO Davinci to platform driver Lad, Prabhakar
2013-08-18  5:18 ` Lad, Prabhakar [this message]
2013-08-23 17:53   ` [PATCH v3 1/7] gpio: davinci: coding style correction Sekhar Nori
2013-08-18  5:18 ` [PATCH v3 2/7] gpio: davinci: move to platform device Lad, Prabhakar
2013-08-23 18:02   ` Sekhar Nori
2013-08-18  5:18 ` [PATCH v3 3/7] ARM: davinci: da8xx: support gpio " Lad, Prabhakar
2013-08-26 10:55   ` Sekhar Nori
2013-08-18  5:19 ` [PATCH v3 4/7] ARM: davinci: devices.c: " Lad, Prabhakar
2013-08-27 19:37   ` Sekhar Nori
2013-08-18  5:19 ` [PATCH v3 5/7] ARM: davinci: da8xx: gpio device creation Lad, Prabhakar
2013-08-27 20:05   ` Sekhar Nori
2013-08-18  5:19 ` [PATCH v3 6/7] ARM: davinci: dmxxx: " Lad, Prabhakar
2013-08-27 20:25   ` Sekhar Nori
2013-08-18  5:19 ` [PATCH v3 7/7] ARM: davinci: Start using gpiolib API inplace of inline functions Lad, Prabhakar
2013-08-27 20:33   ` Sekhar Nori

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=1376803143-13738-2-git-send-email-prabhakar.csengg@gmail.com \
    --to=prabhakar.csengg@gmail.com \
    --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).