From patchwork Sun Aug 18 05:18:57 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Lad, Prabhakar" X-Patchwork-Id: 2846140 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 51FFFBF546 for ; Sun, 18 Aug 2013 05:20:38 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 76FBA2012D for ; Sun, 18 Aug 2013 05:20:37 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7D44120134 for ; Sun, 18 Aug 2013 05:20:36 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1VAvPV-0002ss-8g; Sun, 18 Aug 2013 05:20:17 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1VAvPO-0007SD-U1; Sun, 18 Aug 2013 05:20:10 +0000 Received: from mail-pa0-x22a.google.com ([2607:f8b0:400e:c03::22a]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1VAvPL-0007Qh-7t for linux-arm-kernel@lists.infradead.org; Sun, 18 Aug 2013 05:20:08 +0000 Received: by mail-pa0-f42.google.com with SMTP id lj1so3458043pab.1 for ; Sat, 17 Aug 2013 22:19:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=6YhHbdwJsIX2yrWTdVB1tm1NmEXlTMgirTIAP1Ixo3I=; b=YLLxVq9SDFADteqA6uxrkzEvbJFRzhMpObLErf+G5PApCsDCiGu9kPpKWCKot6epYa eQUgnCWoAfWvcQhbjJ2o+Mc4bglHUElXdNjA1sTo533/7D8xq1MAotVLkWuUY0dVHsg0 +o3VzySyEShVRmo7FnLLJiKSn4sWP7rmRMXabut0l38ib264ZErVA+UMc0I1x5VIHbzo GD/XRQZNt2IQRdnrXOaYuIgUz4vrQX2nyTObq+kqG36ZAAC7WD0dU+7kSdfONrUXUZgZ n6E5M01QvZFskeah6r1sl/TxaQOOjAXrE+wu5xuzk4Pi0gPyQPOHrOEETo3gVoAeIv2s B3Eg== X-Received: by 10.68.191.231 with SMTP id hb7mr6254865pbc.82.1376803184926; Sat, 17 Aug 2013 22:19:44 -0700 (PDT) Received: from localhost.localdomain ([112.79.40.224]) by mx.google.com with ESMTPSA id pq1sm7175496pbb.26.1969.12.31.16.00.00 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 17 Aug 2013 22:19:43 -0700 (PDT) From: "Lad, Prabhakar" To: DLOS , Sekhar Nori Subject: [PATCH v3 1/7] gpio: davinci: coding style correction Date: Sun, 18 Aug 2013 10:48:57 +0530 Message-Id: <1376803143-13738-2-git-send-email-prabhakar.csengg@gmail.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1376803143-13738-1-git-send-email-prabhakar.csengg@gmail.com> References: <1376803143-13738-1-git-send-email-prabhakar.csengg@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130818_012008_186710_634622AF X-CRM114-Status: GOOD ( 12.41 ) X-Spam-Score: -2.0 (--) Cc: Kevin Hilman , Linus Walleij , LKML , "Lad, Prabhakar" , Philip Avinash , Grant Likely , LAK X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Philip Avinash 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 [nsekhar@ti.com: dropped changes which were considered churn - line break fixes and variable name changes] Acked-by: Linus Walleij Signed-off-by: Sekhar Nori Signed-off-by: Lad, Prabhakar --- 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 -#include -#include #include -#include +#include +#include #include +#include #include @@ -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));