From patchwork Sat Aug 13 16:14:06 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shawn Guo X-Patchwork-Id: 3443 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id DA9FB24198 for ; Sat, 13 Aug 2011 16:01:31 +0000 (UTC) Received: from mail-ew0-f52.google.com (mail-ew0-f52.google.com [209.85.215.52]) by fiordland.canonical.com (Postfix) with ESMTP id D0893A18352 for ; Sat, 13 Aug 2011 16:01:31 +0000 (UTC) Received: by mail-ew0-f52.google.com with SMTP id 28so2167074ewy.11 for ; Sat, 13 Aug 2011 09:01:31 -0700 (PDT) Received: by 10.213.29.147 with SMTP id q19mr136210ebc.132.1313251291649; Sat, 13 Aug 2011 09:01:31 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.213.102.5 with SMTP id e5cs22935ebo; Sat, 13 Aug 2011 09:01:31 -0700 (PDT) Received: from mr.google.com ([10.43.44.73]) by 10.43.44.73 with SMTP id uf9mr2544130icb.285.1313251291378 (num_hops = 1); Sat, 13 Aug 2011 09:01:31 -0700 (PDT) Received: by 10.43.44.73 with SMTP id uf9mr2102286icb.285.1313251290639; Sat, 13 Aug 2011 09:01:30 -0700 (PDT) Received: from mail-iy0-f170.google.com (mail-iy0-f170.google.com [209.85.210.170]) by mx.google.com with ESMTPS id md8si11039975icb.153.2011.08.13.09.01.30 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 13 Aug 2011 09:01:30 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.210.170 is neither permitted nor denied by best guess record for domain of shawn.guo@linaro.org) client-ip=209.85.210.170; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.210.170 is neither permitted nor denied by best guess record for domain of shawn.guo@linaro.org) smtp.mail=shawn.guo@linaro.org Received: by mail-iy0-f170.google.com with SMTP id 16so3848137iye.1 for ; Sat, 13 Aug 2011 09:01:30 -0700 (PDT) Received: by 10.42.152.196 with SMTP id j4mr2014208icw.454.1313251290043; Sat, 13 Aug 2011 09:01:30 -0700 (PDT) Received: from localhost.localdomain ([114.216.156.140]) by mx.google.com with ESMTPS id bv10sm1351925icb.1.2011.08.13.09.01.23 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 13 Aug 2011 09:01:29 -0700 (PDT) From: Shawn Guo To: linux-arm-kernel@lists.infradead.org Cc: Russell King - ARM Linux , Grant Likely , Sascha Hauer , Nicolas Pitre , patches@linaro.org, Shawn Guo Subject: [PATCH v2 7/8] gpio/mxs: move irq_to_gpio() into gpio-mxs driver Date: Sun, 14 Aug 2011 00:14:06 +0800 Message-Id: <1313252047-8820-8-git-send-email-shawn.guo@linaro.org> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1313252047-8820-1-git-send-email-shawn.guo@linaro.org> References: <1313252047-8820-1-git-send-email-shawn.guo@linaro.org> As irq_to_gpio() is only being used by gpio-mxs driver, it should be moved from mach/gpio.h into gpio-mxs.c. Signed-off-by: Shawn Guo --- arch/arm/mach-mxs/include/mach/gpio.h | 2 -- drivers/gpio/gpio-mxs.c | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/mach-mxs/include/mach/gpio.h b/arch/arm/mach-mxs/include/mach/gpio.h index bb11e63..8aea2ec 100644 --- a/arch/arm/mach-mxs/include/mach/gpio.h +++ b/arch/arm/mach-mxs/include/mach/gpio.h @@ -22,6 +22,4 @@ #define MXS_GPIO_NR(bank, nr) ((bank) * 32 + (nr)) -#define irq_to_gpio(irq) ((irq) - MXS_GPIO_IRQ_START) - #endif /* __MACH_MXS_GPIO_H__ */ diff --git a/drivers/gpio/gpio-mxs.c b/drivers/gpio/gpio-mxs.c index af55a85..292b504 100644 --- a/drivers/gpio/gpio-mxs.c +++ b/drivers/gpio/gpio-mxs.c @@ -49,6 +49,8 @@ #define GPIO_INT_LEV_MASK (1 << 0) #define GPIO_INT_POL_MASK (1 << 1) +#define irq_to_gpio(irq) ((irq) - MXS_GPIO_IRQ_START) + struct mxs_gpio_port { void __iomem *base; int id;