From: Russell King Date: Mon, 10 Jun 2019 17:11:03 +0000 (+0300) Subject: gpio: omap: clean up register access in omap2_set_gpio_debounce() X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=754dfd7992653ca2e2d6f69fcbf0e9ad3f9ba281;p=openwrt%2Fstaging%2Fblogic.git gpio: omap: clean up register access in omap2_set_gpio_debounce() Signed-off-by: Russell King Signed-off-by: Grygorii Strashko Tested-by: Tony Lindgren Signed-off-by: Linus Walleij --- diff --git a/drivers/gpio/gpio-omap.c b/drivers/gpio/gpio-omap.c index 94b10dfbff3f..52592eac0895 100644 --- a/drivers/gpio/gpio-omap.c +++ b/drivers/gpio/gpio-omap.c @@ -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;