From patchwork Thu Mar 19 17:25:42 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: 452083 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 29AAE140140 for ; Fri, 20 Mar 2015 04:27:03 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756567AbbCSR0r (ORCPT ); Thu, 19 Mar 2015 13:26:47 -0400 Received: from mail-la0-f51.google.com ([209.85.215.51]:36705 "EHLO mail-la0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757404AbbCSR0D (ORCPT ); Thu, 19 Mar 2015 13:26:03 -0400 Received: by lamx15 with SMTP id x15so68060391lam.3 for ; Thu, 19 Mar 2015 10:26:02 -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=rlPkzfkI1xdjPObphXCQggFjpzQff5tprZC/pFy1vLQ=; b=TJsuAyC04LAKdSIkJNj0OeB4wYP4EefT1KqncgxiNf+Vixgx2iJICqgaTOK9etCOj3 8VLY+M4tK/0Nql+A+yJdwdjMqVD6p5NtvP2EPGjDnuHSaZFF8Vns+W9Bbhe5dxv6czdW Qkdr5KEOCsZDPif9M7yyn7pnb623hj9kw/8YpWQepSxRggkN4w2zcEl/8N+8LTertG8D wDrdwF2TFVsidz0qeCLZKtyWiAkEZpiEUiCuS/+kdM/MQVo/QJxKbHGaFYYDIIBauX8N Owl0/P2pPtToVc58fnOTJPvyYEQtqC+JpX6ApnJTBfSouk6QwQfW56J2LKKabJXu3FHP NDzA== X-Gm-Message-State: ALoCoQmywb1hFfqXTv77Uqpe+lhlsu96VhSncNf3FXDq7tQDkjBH534M7jdRn9jltcTb4tjawoMy X-Received: by 10.112.78.37 with SMTP id y5mr68217231lbw.91.1426785962554; Thu, 19 Mar 2015 10:26:02 -0700 (PDT) Received: from localhost ([195.238.92.128]) by mx.google.com with ESMTPSA id an8sm404571lbc.45.2015.03.19.10.26.01 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 19 Mar 2015 10:26:02 -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 6/8] gpio: omap: get rid of GPIO_BIT() macro Date: Thu, 19 Mar 2015 19:25:42 +0200 Message-Id: <1426785944-17255-7-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: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org From: Grygorii Strashko Now OMAP GPIO driver prepared for GPIO_BIT() macro removing. Do it ;) Signed-off-by: Grygorii Strashko Acked-by: Santosh Shilimkar Acked-by: Javier Martinez Canillas --- drivers/gpio/gpio-omap.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/gpio/gpio-omap.c b/drivers/gpio/gpio-omap.c index b39faa8..dd7934a 100644 --- a/drivers/gpio/gpio-omap.c +++ b/drivers/gpio/gpio-omap.c @@ -82,7 +82,6 @@ struct gpio_bank { }; #define GPIO_INDEX(bank, gpio) (gpio % bank->width) -#define GPIO_BIT(bank, gpio) (BIT(GPIO_INDEX(bank, gpio))) #define GPIO_MOD_CTRL_BIT BIT(0) #define BANK_USED(bank) (bank->mod_usage || bank->irq_usage) @@ -863,7 +862,6 @@ static void omap_gpio_unmask_irq(struct irq_data *d) { struct gpio_bank *bank = omap_irq_data_get_bank(d); unsigned offset = d->hwirq; - unsigned int irq_mask = GPIO_BIT(bank, gpio); u32 trigger = irqd_get_trigger_type(d); unsigned long flags; @@ -873,7 +871,7 @@ static void omap_gpio_unmask_irq(struct irq_data *d) /* For level-triggered GPIOs, the clearing must be done after * the HW source is cleared, thus after the handler has run */ - if (bank->level_mask & irq_mask) { + if (bank->level_mask & BIT(offset)) { omap_set_gpio_irqenable(bank, offset, 0); omap_clear_gpio_irqstatus(bank, offset); }