gpio: omap: clean up register access in omap2_set_gpio_debounce()
authorRussell King <rmk+kernel@armlinux.org.uk>
Mon, 10 Jun 2019 17:11:03 +0000 (20:11 +0300)
committerLinus Walleij <linus.walleij@linaro.org>
Wed, 12 Jun 2019 09:15:10 +0000 (11:15 +0200)
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
Tested-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/gpio/gpio-omap.c

index 94b10dfbff3f06a4af4198a3da3ac4486d1b0370..52592eac0895a0972ecaf9c61f62bb17fa834cbe 100644 (file)
@@ -181,7 +181,6 @@ static inline void omap_gpio_dbck_disable(struct gpio_bank *bank)
 static int omap2_set_gpio_debounce(struct gpio_bank *bank, unsigned offset,
                                   unsigned debounce)
 {
-       void __iomem            *reg;
        u32                     val;
        u32                     l;
        bool                    enable = !!debounce;
@@ -198,8 +197,7 @@ static int omap2_set_gpio_debounce(struct gpio_bank *bank, unsigned offset,
        l = BIT(offset);
 
        clk_enable(bank->dbck);
-       reg = bank->base + bank->regs->debounce;
-       writel_relaxed(debounce, reg);
+       writel_relaxed(debounce, bank->base + bank->regs->debounce);
 
        val = omap_gpio_rmw(bank->base + bank->regs->debounce_en, l, enable);
        bank->dbck_enable_mask = val;