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: 6051581 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 7C4669F2A9 for ; Thu, 19 Mar 2015 17:26:58 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id ACF50204FC for ; Thu, 19 Mar 2015 17:26:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D16312050B for ; Thu, 19 Mar 2015 17:26:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756657AbbCSR0r (ORCPT ); Thu, 19 Mar 2015 13:26:47 -0400 Received: from mail-lb0-f173.google.com ([209.85.217.173]:36537 "EHLO mail-lb0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757403AbbCSR0D (ORCPT ); Thu, 19 Mar 2015 13:26:03 -0400 Received: by lbblx11 with SMTP id lx11so35867264lbb.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=fYfMJupn4NrTJ+mz6QmVKXfUr25DVSkGt6BZz7P/yAqks7Fpvwy1eYxRU/8Yx/em+4 s/hOAg0SNBPMpD4DtofecdoUdFGHeUrQGKAo+/KbVd3X/3BEiZa3iUqU8QRn0dqPbSec IfIwKWCXWnTcXiuTb2HsLxH0jys951ac0wyCm/YXkc1lYhYdiMeLJGwOJyxWB6q2efM4 khc2O4F/6OIXAf8cGtnx14yhvM4JhQA8Whu7N4w3lljku6pUxDQEuRw3dDMApJmk/z+K 0V7/sCU99P907p6gIHLImB0gFXTit8SAtWCADSqoJodvVCl/CsTDEjCmAzDWDrTAunRd oWjA== X-Gm-Message-State: ALoCoQk83Eb28VZBM+IgTTbI0lakS09KoIYKAdaj4aKIk0FbnBNrwDJCLI2HE6rftf4mXcwLNZLX 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-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 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); }