aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2014-02-17 22:19:43 +0100
committerLinus Walleij <linus.walleij@linaro.org>2014-03-05 09:57:36 +0800
commitd82f94013a9897e02a93400e4c16efe82b530eaa (patch)
treeb4dcda531526cd5dd2ed82d196061cca8ebf5483
parent905a5117e79367b7e58ae046d12ca9961f048c89 (diff)
downloadlinux-d82f94013a9897e02a93400e4c16efe82b530eaa.tar.gz
pinctrl: sunxi: Fix masking when setting irq type
Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
-rw-r--r--drivers/pinctrl/pinctrl-sunxi.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/pinctrl/pinctrl-sunxi.c b/drivers/pinctrl/pinctrl-sunxi.c
index 787f352e3461..f9fabe9bf47d 100644
--- a/drivers/pinctrl/pinctrl-sunxi.c
+++ b/drivers/pinctrl/pinctrl-sunxi.c
@@ -585,7 +585,7 @@ static int sunxi_pinctrl_irq_set_type(struct irq_data *d,
spin_lock_irqsave(&pctl->lock, flags);
regval = readl(pctl->membase + reg);
- regval &= ~IRQ_CFG_IRQ_MASK;
+ regval &= ~(IRQ_CFG_IRQ_MASK << index);
writel(regval | (mode << index), pctl->membase + reg);
spin_unlock_irqrestore(&pctl->lock, flags);