From patchwork Mon Mar 23 12:18:29 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: 46191 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wg0-f70.google.com (mail-wg0-f70.google.com [74.125.82.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 954E0214B0 for ; Mon, 23 Mar 2015 12:19:31 +0000 (UTC) Received: by wggy19 with SMTP id y19sf26692794wgg.2 for ; Mon, 23 Mar 2015 05:19:30 -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=fggECXy0NSdQ10afUIepp74mtt9aDcB4NutKbnblLps=; b=V0Pu7KtvwHYSHeIqge4KZ1NDqoHFpyF4jHPyV0zdkoVK1vdKxDxrrjZp7imog2uZR1 soRsMDpko4IlLCLzRWbINomLnI48cI4nn2PPDWOBRuOufXryGmiYkHa90UErbkNHCZPd dU3+gs9//lLhTtI3rVT9aNSJDG3O/LOv66zjHN0N+omxyb6cg8eytY0PeudTf2zdItPi bDwUgP+sPilVRxVBcEGfJEMwTZQ/JMFKnoyPPOzC4ak0QtnDfaO5UmK2c+5h1SpKGv2M 06juv9l2QunwRGcFjmS3m4JUOkG4lKrgdg0tCECAjYYCjWoZoFNN6v0HgYwp/1Ihq63A ttyA== X-Gm-Message-State: ALoCoQmnRNtM01k0G9HUVdtRyygY38Ic31aXH8zjCwu/0hrwDdr3EtjWTkt6yEOp3KN5n2jgbjPP X-Received: by 10.112.142.1 with SMTP id rs1mr13395381lbb.19.1427113170862; Mon, 23 Mar 2015 05:19:30 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.170.198 with SMTP id ao6ls76587lac.103.gmail; Mon, 23 Mar 2015 05:19:30 -0700 (PDT) X-Received: by 10.152.163.67 with SMTP id yg3mr74148504lab.42.1427113170479; Mon, 23 Mar 2015 05:19:30 -0700 (PDT) Received: from mail-la0-f45.google.com (mail-la0-f45.google.com. [209.85.215.45]) by mx.google.com with ESMTPS id n5si423527lbk.166.2015.03.23.05.19.30 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 23 Mar 2015 05:19:30 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.45 as permitted sender) client-ip=209.85.215.45; Received: by labe2 with SMTP id e2so57083675lab.3 for ; Mon, 23 Mar 2015 05:19:30 -0700 (PDT) X-Received: by 10.152.28.5 with SMTP id x5mr82247558lag.112.1427113170387; Mon, 23 Mar 2015 05:19:30 -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.57.201 with SMTP id k9csp789532lbq; Mon, 23 Mar 2015 05:19:29 -0700 (PDT) X-Received: by 10.66.65.138 with SMTP id x10mr208802686pas.152.1427113166254; Mon, 23 Mar 2015 05:19:26 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id au5si665410pbc.232.2015.03.23.05.19.24; Mon, 23 Mar 2015 05:19:26 -0700 (PDT) Received-SPF: none (google.com: linux-kernel-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 S1752568AbbCWMTP (ORCPT + 27 others); Mon, 23 Mar 2015 08:19:15 -0400 Received: from mail-la0-f47.google.com ([209.85.215.47]:36075 "EHLO mail-la0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752309AbbCWMSo (ORCPT ); Mon, 23 Mar 2015 08:18:44 -0400 Received: by labe2 with SMTP id e2so57067037lab.3 for ; Mon, 23 Mar 2015 05:18:43 -0700 (PDT) X-Received: by 10.112.42.164 with SMTP id p4mr76601657lbl.119.1427113122984; Mon, 23 Mar 2015 05:18:42 -0700 (PDT) Received: from localhost ([195.238.92.128]) by mx.google.com with ESMTPSA id zo8sm144556lbc.37.2015.03.23.05.18.42 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 23 Mar 2015 05:18:42 -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: [PATCH v2 7/8] gpio: omap: get rid of omap_irq_to_gpio() Date: Mon, 23 Mar 2015 14:18:29 +0200 Message-Id: <1427113110-20813-8-git-send-email-grygorii.strashko@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1427113110-20813-1-git-send-email-grygorii.strashko@linaro.org> References: <1427113110-20813-1-git-send-email-grygorii.strashko@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@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.45 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 ;) Tested-by: Tony Lindgren Tested-by: Aaro Koskinen Acked-by: Santosh Shilimkar Acked-by: Javier Martinez Canillas 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)) {