From patchwork Thu Mar 19 17:25:40 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: 46070 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 919952153C for ; Thu, 19 Mar 2015 17:30:33 +0000 (UTC) Received: by wggy19 with SMTP id y19sf13608904wgg.2 for ; Thu, 19 Mar 2015 10:30:32 -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=ElPXL27aofCC+LCGHvOWri/Nh4HwTBpUyM4fpndDpIs=; b=cNiMHz4x1qIypNbb7vDBPJhlrZojsIG8PaX66IpHY8X0AhbPLSj7SL/21HiHix3Jb5 ClUkBsfvxFiUOMd775dwgHA4kYqVIWbBhv0xsLqNAEd56ZdNITTBfI5/Wqu+ifCU/HKA Ge8/WtoPAX5rnNssFg3IPtFSwslyT+C2OI8QR1LeuA8zPAHr1UIdr1F56SX/rIohfc0N kwbDo1c2ew8sML1Zo8aIqoQSDYWhBStMS9RZhpUG+Ta46NBInUd1ruvg33P/WaQGDSBW RgJXZkBTxuUORhT4VJmXF+SY5kZKPut4urHQQPKfjEJyGwba6AP1pS2ma2NrtijCQr+2 YKcA== X-Gm-Message-State: ALoCoQmPiVTX64trKlgLztDKbURxSd+5irjkUUt3ECRGGkc2BzZTLr0/5VFBJi2skZHhwdoFwhtM X-Received: by 10.180.182.201 with SMTP id eg9mr1972523wic.3.1426786232845; Thu, 19 Mar 2015 10:30:32 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.228.136 with SMTP id si8ls335290lac.11.gmail; Thu, 19 Mar 2015 10:30:32 -0700 (PDT) X-Received: by 10.152.30.103 with SMTP id r7mr65759764lah.76.1426786232614; Thu, 19 Mar 2015 10:30:32 -0700 (PDT) Received: from mail-lb0-f170.google.com (mail-lb0-f170.google.com. [209.85.217.170]) by mx.google.com with ESMTPS id f7si1482878lbs.25.2015.03.19.10.30.32 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 19 Mar 2015 10:30:32 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.170 as permitted sender) client-ip=209.85.217.170; Received: by lbbsy1 with SMTP id sy1so58133614lbb.1 for ; Thu, 19 Mar 2015 10:30:32 -0700 (PDT) X-Received: by 10.152.197.34 with SMTP id ir2mr1920495lac.36.1426786232186; Thu, 19 Mar 2015 10:30:32 -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 h5csp535367lbj; Thu, 19 Mar 2015 10:30:31 -0700 (PDT) X-Received: by 10.70.88.16 with SMTP id bc16mr67683981pdb.140.1426786230278; Thu, 19 Mar 2015 10:30:30 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ev2si4288407pdb.74.2015.03.19.10.30.29; Thu, 19 Mar 2015 10:30:30 -0700 (PDT) Received-SPF: none (google.com: linux-gpio-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 S1752931AbbCSRa1 (ORCPT + 1 other); Thu, 19 Mar 2015 13:30:27 -0400 Received: from mail-lb0-f182.google.com ([209.85.217.182]:35173 "EHLO mail-lb0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757374AbbCSR0B (ORCPT ); Thu, 19 Mar 2015 13:26:01 -0400 Received: by lbcgn8 with SMTP id gn8so57936259lbc.2 for ; Thu, 19 Mar 2015 10:26:00 -0700 (PDT) X-Received: by 10.112.151.2 with SMTP id um2mr19781554lbb.31.1426785960139; Thu, 19 Mar 2015 10:26:00 -0700 (PDT) Received: from localhost ([195.238.92.128]) by mx.google.com with ESMTPSA id dz1sm403603lbc.47.2015.03.19.10.25.59 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 19 Mar 2015 10:25:59 -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 4/8] gpio: omap: drop 'gpio' param from omap_gpio_init_irq() Date: Thu, 19 Mar 2015 19:25:40 +0200 Message-Id: <1426785944-17255-5-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-gpio-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-gpio@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.170 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. 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);