[6/8] gpio: omap: get rid of GPIO_BIT() macro
diff mbox

Message ID 1426785944-17255-7-git-send-email-grygorii.strashko@linaro.org
State New
Headers show

Commit Message

grygorii.strashko@linaro.org March 19, 2015, 5:25 p.m. UTC
From: Grygorii Strashko <grygorii.strashko@linaro.org>

Now OMAP GPIO driver prepared for GPIO_BIT() macro removing.
Do it ;)

Signed-off-by: Grygorii Strashko <grygorii.strashko@linaro.org>
---
 drivers/gpio/gpio-omap.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

Comments

Santosh Shilimkar March 20, 2015, 4:50 p.m. UTC | #1
On 3/19/15 10:25 AM, grygorii.strashko@linaro.org wrote:
> From: Grygorii Strashko <grygorii.strashko@linaro.org>
>
> Now OMAP GPIO driver prepared for GPIO_BIT() macro removing.
> Do it ;)
>
> Signed-off-by: Grygorii Strashko <grygorii.strashko@linaro.org>
> ---

Thanks for the cleanup Grygorii.

Acked-by: Santosh Shilimkar <ssantosh@kernel.org>
--
To unsubscribe from this list: send the line "unsubscribe linux-gpio" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Javier Martinez Canillas March 20, 2015, 6:48 p.m. UTC | #2
On Fri, Mar 20, 2015 at 5:50 PM, santosh.shilimkar@oracle.com
<santosh.shilimkar@oracle.com> wrote:
> On 3/19/15 10:25 AM, grygorii.strashko@linaro.org wrote:
>>
>> From: Grygorii Strashko <grygorii.strashko@linaro.org>
>>
>> Now OMAP GPIO driver prepared for GPIO_BIT() macro removing.
>> Do it ;)
>>
>> Signed-off-by: Grygorii Strashko <grygorii.strashko@linaro.org>
>> ---
>
>
> Thanks for the cleanup Grygorii.
>
> Acked-by: Santosh Shilimkar <ssantosh@kernel.org>

Indeed!

Acked-by: Javier Martinez Canillas <javier@dowhile0.org>
--
To unsubscribe from this list: send the line "unsubscribe linux-gpio" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch
diff mbox

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);
 	}