From patchwork Mon Mar 23 12:18:26 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: 46189 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 D2EB2214B0 for ; Mon, 23 Mar 2015 12:19:14 +0000 (UTC) Received: by wggx13 with SMTP id x13sf26641026wgg.0 for ; Mon, 23 Mar 2015 05:19:14 -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=LbsFPw+4V8IdFrsaQl+CHDOzuu4QEBV0WHm3PG2gsdI=; b=X27xI4R36UhHutQHQVziGAUojGIn3FM6LU2cbo+AL301Bbte6tEHn44286dKYl3JJ7 2z8ERQ2ecuhiN/APCYHNQc3AcFZ0onU5V9HITUewS4hw5dhBuIUHfCdijU229eMq3ChG /IS0KDtRHduBMZ2me3U+EKMsUXGuWbO3ei5S8yxnjPpbJJkdPVa5cWpvXxvSj/Fb/BGD x+aHu0xcORJnLHTW7YenzgypjUxUms73e7UKHmhc3iKFz3fUCHT+/YBKQ4V9FIMYkM12 1SH1ZYVrVjbfPG7Ws+EH7vXJZSCciHAi/Uf7aGyrDe0Gyzco/ce/eCxiCResoeIBnKkE bvEg== X-Gm-Message-State: ALoCoQmZ6IGyp3sGKmNFXnM2f0TEkeouNLZbQ+9mbD3fMNo2T1eTQKuI9FlfVuN+PFsPE7ulBr/U X-Received: by 10.152.27.134 with SMTP id t6mr15490079lag.5.1427113154107; Mon, 23 Mar 2015 05:19:14 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.120.2 with SMTP id ky2ls689331lab.107.gmail; Mon, 23 Mar 2015 05:19:13 -0700 (PDT) X-Received: by 10.112.27.137 with SMTP id t9mr10323891lbg.58.1427113153818; Mon, 23 Mar 2015 05:19:13 -0700 (PDT) Received: from mail-lb0-f179.google.com (mail-lb0-f179.google.com. [209.85.217.179]) by mx.google.com with ESMTPS id oz8si491935lbb.88.2015.03.23.05.19.13 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 23 Mar 2015 05:19:13 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.179 as permitted sender) client-ip=209.85.217.179; Received: by lbcmq2 with SMTP id mq2so6654315lbc.0 for ; Mon, 23 Mar 2015 05:19:13 -0700 (PDT) X-Received: by 10.152.5.225 with SMTP id v1mr52099lav.76.1427113153717; Mon, 23 Mar 2015 05:19:13 -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 k9csp789371lbq; Mon, 23 Mar 2015 05:19:12 -0700 (PDT) X-Received: by 10.66.119.37 with SMTP id kr5mr213307925pab.136.1427113149530; Mon, 23 Mar 2015 05:19:09 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id cb5si844193pbb.125.2015.03.23.05.19.08; Mon, 23 Mar 2015 05:19:09 -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 S1752492AbbCWMSp (ORCPT + 5 others); Mon, 23 Mar 2015 08:18:45 -0400 Received: from mail-lb0-f181.google.com ([209.85.217.181]:34439 "EHLO mail-lb0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752345AbbCWMSk (ORCPT ); Mon, 23 Mar 2015 08:18:40 -0400 Received: by lbbsy1 with SMTP id sy1so116875133lbb.1 for ; Mon, 23 Mar 2015 05:18:39 -0700 (PDT) X-Received: by 10.152.206.7 with SMTP id lk7mr85175568lac.55.1427113118827; Mon, 23 Mar 2015 05:18:38 -0700 (PDT) Received: from localhost ([195.238.92.128]) by mx.google.com with ESMTPSA id mm7sm146915lbb.30.2015.03.23.05.18.38 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 23 Mar 2015 05:18:38 -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 4/8] gpio: omap: drop 'gpio' param from omap_gpio_init_irq() Date: Mon, 23 Mar 2015 14:18:26 +0200 Message-Id: <1427113110-20813-5-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-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.217.179 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 The 'gpio' parameter isn't needed any more as it duplicates 'offset' parameter, so drop 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 | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/drivers/gpio/gpio-omap.c b/drivers/gpio/gpio-omap.c index 2df693b..ff5d54d 100644 --- a/drivers/gpio/gpio-omap.c +++ b/drivers/gpio/gpio-omap.c @@ -479,14 +479,13 @@ static int omap_gpio_is_input(struct gpio_bank *bank, unsigned offset) return readl_relaxed(reg) & BIT(offset); } -static void omap_gpio_init_irq(struct gpio_bank *bank, unsigned gpio, - unsigned offset) +static void omap_gpio_init_irq(struct gpio_bank *bank, unsigned offset) { if (!LINE_USED(bank->mod_usage, offset)) { omap_enable_gpio_module(bank, offset); omap_set_gpio_direction(bank, offset, 1); } - bank->irq_usage |= BIT(GPIO_INDEX(bank, gpio)); + bank->irq_usage |= BIT(offset); } static int omap_gpio_irq_type(struct irq_data *d, unsigned type) @@ -518,7 +517,7 @@ static int omap_gpio_irq_type(struct irq_data *d, unsigned type) spin_lock_irqsave(&bank->lock, flags); offset = GPIO_INDEX(bank, gpio); retval = omap_set_gpio_triggering(bank, offset, type); - omap_gpio_init_irq(bank, gpio, offset); + omap_gpio_init_irq(bank, offset); if (!omap_gpio_is_input(bank, offset)) { spin_unlock_irqrestore(&bank->lock, flags); return -EINVAL; @@ -803,15 +802,14 @@ exit: static unsigned int omap_gpio_irq_startup(struct irq_data *d) { struct gpio_bank *bank = omap_irq_data_get_bank(d); - unsigned int gpio = omap_irq_to_gpio(bank, d->hwirq); unsigned long flags; - unsigned offset = GPIO_INDEX(bank, gpio); + unsigned offset = d->hwirq; if (!BANK_USED(bank)) pm_runtime_get_sync(bank->dev); spin_lock_irqsave(&bank->lock, flags); - omap_gpio_init_irq(bank, gpio, offset); + omap_gpio_init_irq(bank, offset); spin_unlock_irqrestore(&bank->lock, flags); omap_gpio_unmask_irq(d);