From patchwork Mon Mar 23 12:18:24 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: 46187 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-we0-f198.google.com (mail-we0-f198.google.com [74.125.82.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 45A35214B0 for ; Mon, 23 Mar 2015 12:18:53 +0000 (UTC) Received: by wesw62 with SMTP id w62sf10245449wes.0 for ; Mon, 23 Mar 2015 05:18:52 -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=dyxYrq9Yb4OtEpw1bgGCt3G0IKJmWgjQPI0TDWhHhIo=; b=KXuJAHJimApaMoLkQyBvGnHz9g6Ilc8poTItz0Xk8AvrFNTtxZTYhVpW51fVilJaMD zHTRVPCIFZXsKYUsCmuP2eza6Tr4WL7nT7Yi5Gbitqs4ONkIMPZUu4dNV/fQ+GO1aDiC 5OKnKPnt3jvuHGVIVRidmeRYy5iJxMhl3xK6iwZJqdsjWEEWOp0cjWSyVwqOF2n8Lw0+ ynWIZMUEogxcrKQLqqfuPYlIpi9uRxvQLmFcQfPVMGj8NjGfLRz0Y2rrZdU326KP+PJi Pj7YQIWscVvKv0PTihjdKDpfeIwciw6d0j3IIQdkQ2vIj/KYfrWVsvIGyk43A78ZxQY4 8zwg== X-Gm-Message-State: ALoCoQlXqwXBmfpAUkY4lNbWNkv0q2g81SaTDF7tWQ/V3km1gcWw9+00jkllyH1E5Q9TVcTkIryh X-Received: by 10.180.182.201 with SMTP id eg9mr1980233wic.3.1427113132589; Mon, 23 Mar 2015 05:18:52 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.42.137 with SMTP id o9ls617645lal.65.gmail; Mon, 23 Mar 2015 05:18:52 -0700 (PDT) X-Received: by 10.112.219.196 with SMTP id pq4mr83954456lbc.104.1427113132288; Mon, 23 Mar 2015 05:18:52 -0700 (PDT) Received: from mail-la0-f47.google.com (mail-la0-f47.google.com. [209.85.215.47]) by mx.google.com with ESMTPS id fg9si551923lbc.10.2015.03.23.05.18.52 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 23 Mar 2015 05:18:52 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.47 as permitted sender) client-ip=209.85.215.47; Received: by lagg8 with SMTP id g8so132500480lag.1 for ; Mon, 23 Mar 2015 05:18:52 -0700 (PDT) X-Received: by 10.112.46.74 with SMTP id t10mr6692467lbm.73.1427113132197; Mon, 23 Mar 2015 05:18:52 -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 k9csp789195lbq; Mon, 23 Mar 2015 05:18:51 -0700 (PDT) X-Received: by 10.69.14.193 with SMTP id fi1mr20608064pbd.154.1427113127618; Mon, 23 Mar 2015 05:18:47 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id te6si741149pbc.185.2015.03.23.05.18.46; Mon, 23 Mar 2015 05:18:47 -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 S1752447AbbCWMSm (ORCPT + 5 others); Mon, 23 Mar 2015 08:18:42 -0400 Received: from mail-la0-f51.google.com ([209.85.215.51]:34606 "EHLO mail-la0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752294AbbCWMSh (ORCPT ); Mon, 23 Mar 2015 08:18:37 -0400 Received: by lagg8 with SMTP id g8so132494811lag.1 for ; Mon, 23 Mar 2015 05:18:36 -0700 (PDT) X-Received: by 10.152.219.2 with SMTP id pk2mr82562246lac.107.1427113116209; Mon, 23 Mar 2015 05:18:36 -0700 (PDT) Received: from localhost ([195.238.92.128]) by mx.google.com with ESMTPSA id p11sm152381lbs.13.2015.03.23.05.18.35 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 23 Mar 2015 05:18:35 -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 2/8] gpio: omap: simplify omap_set_gpio_dataout_x() Date: Mon, 23 Mar 2015 14:18:24 +0200 Message-Id: <1427113110-20813-3-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.215.47 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 Both functions omap_set_gpio_dataout_reg() and omap_set_gpio_dataout_mask() accept GPIO offset as 'gpio' input parameter, so rename it to 'offset' and drop usage of GPIO_BIT() macro. 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 | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/gpio/gpio-omap.c b/drivers/gpio/gpio-omap.c index ce71239..7aeee7b 100644 --- a/drivers/gpio/gpio-omap.c +++ b/drivers/gpio/gpio-omap.c @@ -75,7 +75,7 @@ struct gpio_bank { int power_mode; bool workaround_enabled; - void (*set_dataout)(struct gpio_bank *bank, int gpio, int enable); + void (*set_dataout)(struct gpio_bank *bank, unsigned gpio, int enable); int (*get_context_loss_count)(struct device *dev); struct omap_gpio_reg_offs *regs; @@ -119,11 +119,11 @@ static void omap_set_gpio_direction(struct gpio_bank *bank, int gpio, /* set data out value using dedicate set/clear register */ -static void omap_set_gpio_dataout_reg(struct gpio_bank *bank, int gpio, +static void omap_set_gpio_dataout_reg(struct gpio_bank *bank, unsigned offset, int enable) { void __iomem *reg = bank->base; - u32 l = GPIO_BIT(bank, gpio); + u32 l = BIT(offset); if (enable) { reg += bank->regs->set_dataout; @@ -137,11 +137,11 @@ static void omap_set_gpio_dataout_reg(struct gpio_bank *bank, int gpio, } /* set data out value using mask register */ -static void omap_set_gpio_dataout_mask(struct gpio_bank *bank, int gpio, +static void omap_set_gpio_dataout_mask(struct gpio_bank *bank, unsigned offset, int enable) { void __iomem *reg = bank->base + bank->regs->dataout; - u32 gpio_bit = GPIO_BIT(bank, gpio); + u32 gpio_bit = BIT(offset); u32 l; l = readl_relaxed(reg);