From patchwork Thu Mar 19 17:25:38 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: 46064 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f197.google.com (mail-lb0-f197.google.com [209.85.217.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 8F6BB2153C for ; Thu, 19 Mar 2015 17:26:05 +0000 (UTC) Received: by lbvp9 with SMTP id p9sf13768962lbv.0 for ; Thu, 19 Mar 2015 10:26:04 -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=S/rnW/Hlv3G8iuNoekEsINCci6RPKb5taEyuTO7AzEc=; b=D5BfdGcGnQSkB6R7xB+kDon9FcT4VLsdZskE8WZOL7yZVvu+Wwui7u3DTvH4Np8itg K4XYzAhvgOr6/k36Gs5US+zRukfFdyhD08PJtoNdk2Jpg0w4YLlfCheeJc7XVT8txOZA lBjhEvOyFKkSVykFo+w034ypCuFPvKnI2uHjiKlQo0XAUeFniCsuiuhkZvnSxplTddL/ 0/aeerzrF99GbCJ3ZFnnRbFneH89s+YR1RbnxOTc/F0L383Hu+j6jbCJMpiYo4F0xms8 YPG0dgJLFiVkozG6sMQef35S2yOPxmtY1X0c8/KyON+HjMzSllmW7VoUaFqZ0twHLp7w tHFw== X-Gm-Message-State: ALoCoQmYx4yD8ZijsKxhLkREINuza/kRSnUBh3xpjj1bTb+fpeV2SW8srga/RPmuXi95h8mbPFa8 X-Received: by 10.152.87.141 with SMTP id ay13mr8187230lab.3.1426785964529; Thu, 19 Mar 2015 10:26:04 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.10.132 with SMTP id i4ls304603lab.25.gmail; Thu, 19 Mar 2015 10:26:04 -0700 (PDT) X-Received: by 10.112.51.114 with SMTP id j18mr67992713lbo.97.1426785964172; Thu, 19 Mar 2015 10:26:04 -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 qv10si1440968lbb.83.2015.03.19.10.26.04 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 19 Mar 2015 10:26:04 -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 lagg8 with SMTP id g8so67954384lag.1 for ; Thu, 19 Mar 2015 10:26:04 -0700 (PDT) X-Received: by 10.112.130.39 with SMTP id ob7mr71781099lbb.32.1426785964084; Thu, 19 Mar 2015 10:26:04 -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 h5csp533026lbj; Thu, 19 Mar 2015 10:26:03 -0700 (PDT) X-Received: by 10.70.37.238 with SMTP id b14mr175416488pdk.50.1426785962299; Thu, 19 Mar 2015 10:26:02 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id xh9si4136212pab.119.2015.03.19.10.26.01; Thu, 19 Mar 2015 10:26:02 -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 S1755511AbbCSR0A (ORCPT + 1 other); Thu, 19 Mar 2015 13:26:00 -0400 Received: from mail-lb0-f175.google.com ([209.85.217.175]:36460 "EHLO mail-lb0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755091AbbCSRZ6 (ORCPT ); Thu, 19 Mar 2015 13:25:58 -0400 Received: by lbblx11 with SMTP id lx11so35865211lbb.3 for ; Thu, 19 Mar 2015 10:25:56 -0700 (PDT) X-Received: by 10.112.62.135 with SMTP id y7mr69291272lbr.50.1426785956659; Thu, 19 Mar 2015 10:25:56 -0700 (PDT) Received: from localhost ([195.238.92.128]) by mx.google.com with ESMTPSA id w9sm409623laj.24.2015.03.19.10.25.56 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 19 Mar 2015 10:25:56 -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 2/8] gpio: omap: simplify omap_set_gpio_dataout_x() Date: Thu, 19 Mar 2015 19:25:38 +0200 Message-Id: <1426785944-17255-3-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.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 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. 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);