From patchwork Sat Aug 13 16:14:04 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shawn Guo X-Patchwork-Id: 3441 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 88BE224198 for ; Sat, 13 Aug 2011 16:01:16 +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 7E457A1836B for ; Sat, 13 Aug 2011 16:01:16 +0000 (UTC) Received: by mail-ew0-f52.google.com with SMTP id 28so2167074ewy.11 for ; Sat, 13 Aug 2011 09:01:16 -0700 (PDT) Received: by 10.213.14.67 with SMTP id f3mr138444eba.56.1313251276264; Sat, 13 Aug 2011 09:01:16 -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 e5cs22928ebo; Sat, 13 Aug 2011 09:01:16 -0700 (PDT) Received: from mr.google.com ([10.42.130.68]) by 10.42.130.68 with SMTP id u4mr2621324ics.464.1313251275985 (num_hops = 1); Sat, 13 Aug 2011 09:01:15 -0700 (PDT) Received: by 10.42.130.68 with SMTP id u4mr2177105ics.464.1313251275397; Sat, 13 Aug 2011 09:01:15 -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.14 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 13 Aug 2011 09:01:15 -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:14 -0700 (PDT) Received: by 10.42.97.195 with SMTP id p3mr1926290icn.237.1313251274802; Sat, 13 Aug 2011 09:01:14 -0700 (PDT) Received: from localhost.localdomain ([114.216.156.140]) by mx.google.com with ESMTPS id bv10sm1351925icb.1.2011.08.13.09.01.08 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 13 Aug 2011 09:01:14 -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 5/8] gpio/mxc: move irq_to_gpio() into gpio-mxc driver Date: Sun, 14 Aug 2011 00:14:04 +0800 Message-Id: <1313252047-8820-6-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-mxc driver, it should be moved from mach/gpio.h into gpio-mxc.c. Signed-off-by: Shawn Guo --- arch/arm/plat-mxc/include/mach/gpio.h | 2 -- drivers/gpio/gpio-mxc.c | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/plat-mxc/include/mach/gpio.h b/arch/arm/plat-mxc/include/mach/gpio.h index 9a7c750..8e5276c 100644 --- a/arch/arm/plat-mxc/include/mach/gpio.h +++ b/arch/arm/plat-mxc/include/mach/gpio.h @@ -27,6 +27,4 @@ /* range e.g. GPIO_1_5 is gpio 5 under linux */ #define IMX_GPIO_NR(bank, nr) (((bank) - 1) * 32 + (nr)) -#define irq_to_gpio(irq) ((irq) - MXC_GPIO_IRQ_START) - #endif diff --git a/drivers/gpio/gpio-mxc.c b/drivers/gpio/gpio-mxc.c index 64aff20..b588f8a 100644 --- a/drivers/gpio/gpio-mxc.c +++ b/drivers/gpio/gpio-mxc.c @@ -31,6 +31,8 @@ #include #include +#define irq_to_gpio(irq) ((irq) - MXC_GPIO_IRQ_START) + enum mxc_gpio_hwtype { IMX1_GPIO, /* runs on i.mx1 */ IMX21_GPIO, /* runs on i.mx21 and i.mx27 */