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: 6051691 Return-Path: X-Original-To: patchwork-linux-omap@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 46EFFBF90F for ; Thu, 19 Mar 2015 17:30:57 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 6F9302051D for ; Thu, 19 Mar 2015 17:30:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5AB442050B for ; Thu, 19 Mar 2015 17:30:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757380AbbCSR0B (ORCPT ); Thu, 19 Mar 2015 13:26:01 -0400 Received: from mail-la0-f41.google.com ([209.85.215.41]:32889 "EHLO mail-la0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751493AbbCSRZ6 (ORCPT ); Thu, 19 Mar 2015 13:25:58 -0400 Received: by ladw1 with SMTP id w1so67890264lad.0 for ; Thu, 19 Mar 2015 10:25:56 -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=LjTJzmUugyfYB8vlxsBOiwufbxFNEeW4fEsPHX+0390=; b=ANcDCOvr4kVhg7DIBvlKQvF28bgJVH85aC4Ba3KAm7/HqoKeSR1PHcUaM9B8ApqI/I T5PxezbfcWs8XTSnvr8NJf+udsnXTfxAmXnoDGNB2k8ifjpDv8Fe/DgVmW10qTg77+E/ 4TZeUa3DqhQNfsFlzj7ugXPUril9Gk2cGWpKi84SDn6RtrSLha5PsX851f4bGmasiLa8 FJgJcL8FtD8J4qymwQyrsugDmRmaKtO+q6F/B7IFkjxUlpfFDPqf1frfSKM81OEO/+XD JzXeEVn9NZ3X2aarS4fV4XmWD+tL4+wY8oKDQTFyI+vaQmyXzge0swtqd1qWlDR9m5V5 R7ow== X-Gm-Message-State: ALoCoQmQNlTE7fbX1++eqDv5UEeosxihqkcq1oeCBoF2z3pPubJg1eniBm4ehr15s3tVllkdLuhs 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-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. Signed-off-by: Grygorii Strashko Acked-by: Santosh Shilimkar Acked-by: Javier Martinez Canillas --- 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);