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: 6071721 Return-Path: X-Original-To: patchwork-linux-omap@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 766679F39E for ; Mon, 23 Mar 2015 12:18:49 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A19B0201F2 for ; Mon, 23 Mar 2015 12:18:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B0D322020F for ; Mon, 23 Mar 2015 12:18:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752447AbbCWMSm (ORCPT ); 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-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=/kv33LnZ3w+lKX43+PFFdtlQ9cyozsgVPppfaMFHMv0=; b=eF7t95tAgrqn+O13paTzV+BVxT1Pjv1awqS7Hz/dn9zOctZeoAljw5tvKeRI5rmAmy E8hfY1fblxOHELIWMSaENMJnhyhI+AzWoH2mwTTai2fvsSqlD/EUTlhGhaPJShHmMAUM fBMEM2DVZZKBMxuzY8BDG6komWOSAsW8pDe2VJot5MqVZuQNdtUtA0R2hqQJ+BBfjAxP wM538Zt2frDpFfxCioWU9UMBc0KL6HGXq43WM6kRPHfbb+evO3QaDspZb8jN9Dznfmi6 yOiX3HMNOR+lOf9VCjkyjP5BU5c3HhwUkoCe+qS3GxTy9A0wqVDwrPp8cbwOeAZN9S/X zoRA== X-Gm-Message-State: ALoCoQnGPvis8pD7CvovdpPKTWH/s20hqW7mQCjrKPZc+QWss/ztcl9UirgL30Cg8XDrOuh03Ur9 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: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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);