From patchwork Fri Aug 12 07:55:00 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shawn Guo X-Patchwork-Id: 3403 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 7763323F41 for ; Fri, 12 Aug 2011 07:43:11 +0000 (UTC) Received: from mail-qw0-f52.google.com (mail-qw0-f52.google.com [209.85.216.52]) by fiordland.canonical.com (Postfix) with ESMTP id 46ABDA1833C for ; Fri, 12 Aug 2011 07:43:11 +0000 (UTC) Received: by mail-qw0-f52.google.com with SMTP id 8so2136278qwb.11 for ; Fri, 12 Aug 2011 00:43:11 -0700 (PDT) Received: by 10.229.22.20 with SMTP id l20mr416821qcb.60.1313134991026; Fri, 12 Aug 2011 00:43:11 -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.229.190.71 with SMTP id dh7cs140481qcb; Fri, 12 Aug 2011 00:43:10 -0700 (PDT) Received: from mr.google.com ([10.52.186.138]) by 10.52.186.138 with SMTP id fk10mr732235vdc.161.1313134990827 (num_hops = 1); Fri, 12 Aug 2011 00:43:10 -0700 (PDT) Received: by 10.52.186.138 with SMTP id fk10mr532117vdc.161.1313134990615; Fri, 12 Aug 2011 00:43:10 -0700 (PDT) Received: from mail-qw0-f50.google.com (mail-qw0-f50.google.com [209.85.216.50]) by mx.google.com with ESMTPS id v17si1818649vcq.83.2011.08.12.00.43.10 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 12 Aug 2011 00:43:10 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.216.50 is neither permitted nor denied by best guess record for domain of shawn.guo@linaro.org) client-ip=209.85.216.50; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.216.50 is neither permitted nor denied by best guess record for domain of shawn.guo@linaro.org) smtp.mail=shawn.guo@linaro.org Received: by qwe5 with SMTP id 5so1736267qwe.37 for ; Fri, 12 Aug 2011 00:43:10 -0700 (PDT) Received: by 10.142.218.11 with SMTP id q11mr349042wfg.54.1313134989730; Fri, 12 Aug 2011 00:43:09 -0700 (PDT) Received: from localhost.localdomain ([58.208.99.22]) by mx.google.com with ESMTPS id 14sm1379325wfl.5.2011.08.12.00.42.55 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 12 Aug 2011 00:43:09 -0700 (PDT) From: Shawn Guo To: linux-arm-kernel@lists.infradead.org Cc: Russell King - ARM Linux , Grant Likely , Nicolas Pitre , Sascha Hauer , patches@linaro.org, Shawn Guo Subject: [PATCH 5/6] gpio/mxc: move irq_to_gpio() into gpio-mxc driver Date: Fri, 12 Aug 2011 15:55:00 +0800 Message-Id: <1313135701-22456-6-git-send-email-shawn.guo@linaro.org> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1313135701-22456-1-git-send-email-shawn.guo@linaro.org> References: <1313135701-22456-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 Cc: Sascha Hauer Cc: Grant Likely --- 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 */