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: 2846143 Return-Path: X-Original-To: patchwork-davinci@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 1A6869F271 for ; Sun, 18 Aug 2013 05:21:12 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 2863020201 for ; Sun, 18 Aug 2013 05:21:11 +0000 (UTC) Received: from devils.ext.ti.com (devils.ext.ti.com [198.47.26.153]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1EADA20214 for ; Sun, 18 Aug 2013 05:21:10 +0000 (UTC) Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by devils.ext.ti.com (8.13.7/8.13.7) with ESMTP id r7I5Ju66007739; Sun, 18 Aug 2013 00:19:56 -0500 Received: from DFLE73.ent.ti.com (dfle73.ent.ti.com [128.247.5.110]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id r7I5Juc3024519; Sun, 18 Aug 2013 00:19:56 -0500 Received: from dlelxv23.itg.ti.com (172.17.1.198) by DFLE73.ent.ti.com (128.247.5.110) with Microsoft SMTP Server id 14.2.342.3; Sun, 18 Aug 2013 00:19:56 -0500 Received: from linux.omap.com (dlelxs01.itg.ti.com [157.170.227.31]) by dlelxv23.itg.ti.com (8.13.8/8.13.8) with ESMTP id r7I5JtqO012165; Sun, 18 Aug 2013 00:19:56 -0500 Received: from linux.omap.com (localhost [127.0.0.1]) by linux.omap.com (Postfix) with ESMTP id B205C8062B; Sun, 18 Aug 2013 00:19:54 -0500 (CDT) X-Original-To: davinci-linux-open-source@linux.davincidsp.com Delivered-To: davinci-linux-open-source@linux.davincidsp.com Received: from dflp53.itg.ti.com (dflp53.itg.ti.com [128.247.5.6]) by linux.omap.com (Postfix) with ESMTP id C02D380626 for ; Sun, 18 Aug 2013 00:19:48 -0500 (CDT) Received: from red.ext.ti.com (red.ext.ti.com [192.94.93.37]) by dflp53.itg.ti.com (8.13.8/8.13.8) with ESMTP id r7I5JmJ4018755 for ; Sun, 18 Aug 2013 00:19:48 -0500 (CDT) Received: from mail6.bemta12.messagelabs.com (mail6.bemta12.messagelabs.com [216.82.250.247]) by red.ext.ti.com (8.13.7/8.13.7) with ESMTP id r7I5JmMG024434 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Sun, 18 Aug 2013 00:19:48 -0500 Received: from [216.82.250.51:51065] by server-2.bemta-12.messagelabs.com id 1F/B5-12774-47950125; Sun, 18 Aug 2013 05:19:48 +0000 X-Env-Sender: prabhakar.csengg@gmail.com X-Msg-Ref: server-9.tower-108.messagelabs.com!1376803185!15000108!1 X-Originating-IP: [209.85.192.175] X-SpamReason: No, hits=0.0 required=7.0 tests=ML_RADAR_SPEW_LINKS_14, spamassassin: X-StarScan-Received: X-StarScan-Version: 6.9.11; banners=-,-,- X-VirusChecked: Checked Received: (qmail 5724 invoked from network); 18 Aug 2013 05:19:47 -0000 Received: from mail-pd0-f175.google.com (HELO mail-pd0-f175.google.com) (209.85.192.175) by server-9.tower-108.messagelabs.com with RC4-SHA encrypted SMTP; 18 Aug 2013 05:19:47 -0000 Received: by mail-pd0-f175.google.com with SMTP id q10so3689416pdj.6 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> CC: Linus Walleij , LKML , Philip Avinash , Grant Likely , LAK X-BeenThere: davinci-linux-open-source@linux.davincidsp.com X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: Errors-To: davinci-linux-open-source-bounces@linux.davincidsp.com X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham 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));