]> Pileus Git - ~andy/linux/commitdiff
pinctrl: sunxi: Fix masking when setting irq type
authorHans de Goede <hdegoede@redhat.com>
Mon, 17 Feb 2014 21:19:43 +0000 (22:19 +0100)
committerLinus Walleij <linus.walleij@linaro.org>
Wed, 5 Mar 2014 01:57:36 +0000 (09:57 +0800)
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>
drivers/pinctrl/pinctrl-sunxi.c

index 787f352e3461a99a8989ec6047ae8e9e48ac82a2..f9fabe9bf47d433b9152cd438e259e568b3b9ff5 100644 (file)
@@ -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);