From patchwork Thu Mar 19 17:25:43 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Grygorii.Strashko@linaro.org" X-Patchwork-Id: 46068 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wg0-f69.google.com (mail-wg0-f69.google.com [74.125.82.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 7DEB62153C for ; Thu, 19 Mar 2015 17:26:37 +0000 (UTC) Received: by wghl18 with SMTP id l18sf13593892wgh.1 for ; Thu, 19 Mar 2015 10:26:36 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe; bh=pmDCGdU9wU72zFNvjz72q8kH2gFjImIPCCf56J/pRsE=; b=ljaT4YohwSsYVgepu2wcazaUlq/aWJMvmdm9ZdpbO1x34/l3fOoE/Ho8fGKeYLSQ/K zkGvf6QpvUy/2a039+dKUqn3aHU5hrX1s8HlKZG8D2Pv5xGPDXJ04e10i8NOr4AyKGUk eQy59J0LgWDQ2VVjyOb6+K7wTWM60TzhH9/nHhsTNqDSrhlb6c3E78Wdrh2JoEbvCSRd TT+1dK8PRQpjMBrnnwO1ByI5sMWZ7yFkxOYW240bnZ0P08BkVJff65akbGpExA3V3xI/ SElbP5R2Tp91yFwOvNbIRnrUfg6f7ACfQE3h7xykKKFDjEb33SOx3Hy6Q/5/35b5QU0u atkA== X-Gm-Message-State: ALoCoQm8vr+hEawRmutoC2AeKe6dZYobWUNTtDgN5SuSPznkOcRHWibllHXJt8HfWc5ddYM4F5hg X-Received: by 10.112.198.34 with SMTP id iz2mr12287866lbc.22.1426785996757; Thu, 19 Mar 2015 10:26:36 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.206.72 with SMTP id lm8ls338436lac.3.gmail; Thu, 19 Mar 2015 10:26:36 -0700 (PDT) X-Received: by 10.112.215.101 with SMTP id oh5mr35785432lbc.67.1426785996476; Thu, 19 Mar 2015 10:26:36 -0700 (PDT) Received: from mail-la0-f42.google.com (mail-la0-f42.google.com. [209.85.215.42]) by mx.google.com with ESMTPS id q3si1489408lag.1.2015.03.19.10.26.36 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 19 Mar 2015 10:26:36 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.42 as permitted sender) client-ip=209.85.215.42; Received: by lagg8 with SMTP id g8so67966305lag.1 for ; Thu, 19 Mar 2015 10:26:36 -0700 (PDT) X-Received: by 10.112.8.101 with SMTP id q5mr64197050lba.19.1426785996266; Thu, 19 Mar 2015 10:26:36 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.35.133 with SMTP id h5csp533316lbj; Thu, 19 Mar 2015 10:26:35 -0700 (PDT) X-Received: by 10.70.53.170 with SMTP id c10mr107895634pdp.148.1426785994373; Thu, 19 Mar 2015 10:26:34 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w4si3969566pdi.213.2015.03.19.10.26.32; Thu, 19 Mar 2015 10:26:34 -0700 (PDT) Received-SPF: none (google.com: linux-omap-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757439AbbCSR0K (ORCPT + 5 others); Thu, 19 Mar 2015 13:26:10 -0400 Received: from mail-lb0-f181.google.com ([209.85.217.181]:35218 "EHLO mail-lb0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757407AbbCSR0F (ORCPT ); Thu, 19 Mar 2015 13:26:05 -0400 Received: by lbcgn8 with SMTP id gn8so57937592lbc.2 for ; Thu, 19 Mar 2015 10:26:03 -0700 (PDT) X-Received: by 10.112.167.138 with SMTP id zo10mr5476406lbb.75.1426785963738; Thu, 19 Mar 2015 10:26:03 -0700 (PDT) Received: from localhost ([195.238.92.128]) by mx.google.com with ESMTPSA id kd7sm405417lbc.42.2015.03.19.10.26.03 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 19 Mar 2015 10:26:03 -0700 (PDT) From: To: Javier Martinez Canillas , Linus Walleij , Alexandre Courbot , ssantosh@kernel.org, Kevin Hilman , tony@atomide.com Cc: linux-omap@vger.kernel.org, linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, Grygorii Strashko Subject: [RFT OMAP1 PATCH 7/8] gpio: omap: get rid of omap_irq_to_gpio() Date: Thu, 19 Mar 2015 19:25:43 +0200 Message-Id: <1426785944-17255-8-git-send-email-grygorii.strashko@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1426785944-17255-1-git-send-email-grygorii.strashko@linaro.org> References: <1426785944-17255-1-git-send-email-grygorii.strashko@linaro.org> Sender: linux-omap-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: grygorii.strashko@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.42 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , From: Grygorii Strashko Now OMAP GPIO driver prepared for omap_irq_to_gpio() removing. Do it ;) Signed-off-by: Grygorii Strashko --- drivers/gpio/gpio-omap.c | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/drivers/gpio/gpio-omap.c b/drivers/gpio/gpio-omap.c index dd7934a..615e950 100644 --- a/drivers/gpio/gpio-omap.c +++ b/drivers/gpio/gpio-omap.c @@ -89,11 +89,6 @@ struct gpio_bank { static void omap_gpio_unmask_irq(struct irq_data *d); -static int omap_irq_to_gpio(struct gpio_bank *bank, unsigned int gpio_irq) -{ - return bank->chip.base + gpio_irq; -} - static inline struct gpio_bank *omap_irq_data_get_bank(struct irq_data *d) { struct gpio_chip *chip = irq_data_get_irq_chip_data(d); @@ -490,22 +485,21 @@ static void omap_gpio_init_irq(struct gpio_bank *bank, unsigned offset) static int omap_gpio_irq_type(struct irq_data *d, unsigned type) { struct gpio_bank *bank = omap_irq_data_get_bank(d); - unsigned gpio = 0; int retval; unsigned long flags; - unsigned offset; + unsigned offset = d->hwirq; if (!BANK_USED(bank)) pm_runtime_get_sync(bank->dev); #ifdef CONFIG_ARCH_OMAP1 - if (d->irq > IH_MPUIO_BASE) + if (d->irq > IH_MPUIO_BASE) { + unsigned gpio = 0; gpio = OMAP_MPUIO(d->irq - IH_MPUIO_BASE); + offset = GPIO_INDEX(bank, gpio); + } #endif - if (!gpio) - gpio = omap_irq_to_gpio(bank, d->hwirq); - if (type & ~IRQ_TYPE_SENSE_MASK) return -EINVAL; @@ -514,7 +508,6 @@ static int omap_gpio_irq_type(struct irq_data *d, unsigned type) return -EINVAL; spin_lock_irqsave(&bank->lock, flags); - offset = GPIO_INDEX(bank, gpio); retval = omap_set_gpio_triggering(bank, offset, type); omap_gpio_init_irq(bank, offset); if (!omap_gpio_is_input(bank, offset)) {