summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@armlinux.org.uk>2019-06-10 19:11:03 +0200
committerLinus Walleij <linus.walleij@linaro.org>2019-06-12 11:15:10 +0200
commit754dfd7992653ca2e2d6f69fcbf0e9ad3f9ba281 (patch)
tree30e9f24642a6d7adb4b4b33082ad120221677e8c
parentgpio: omap: irq_startup() must not return error codes (diff)
downloadlinux-754dfd7992653ca2e2d6f69fcbf0e9ad3f9ba281.tar.xz
linux-754dfd7992653ca2e2d6f69fcbf0e9ad3f9ba281.zip
gpio: omap: clean up register access in omap2_set_gpio_debounce()
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>
-rw-r--r--drivers/gpio/gpio-omap.c4
1 files changed, 1 insertions, 3 deletions
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;