diff options
author | Maxime Ripard <maxime.ripard@free-electrons.com> | 2014-06-05 15:26:00 +0200 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2014-06-19 09:35:11 +0200 |
commit | 645ec714545bca2a0ed13d7ac5b97d95e09da853 (patch) | |
tree | 83a9f1880fac6de6a4e9bbcf29879f2cf63a7b04 /drivers/pinctrl | |
parent | 7171511eaec5bf23fb06078f59784a3a0626b38f (diff) | |
download | blackbird-op-linux-645ec714545bca2a0ed13d7ac5b97d95e09da853.tar.gz blackbird-op-linux-645ec714545bca2a0ed13d7ac5b97d95e09da853.zip |
pinctrl: sunxi: Remove irq_mask_ack and use irq_ack instead
If irq_mask_ack is not defined, mask_ack_irq will call irq_mask and then
irq_ack. In order to avoid code duplication, between irq_mask_ack and irq_mask,
just declare irq_ack.
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/pinctrl')
-rw-r--r-- | drivers/pinctrl/sunxi/pinctrl-sunxi.c | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/drivers/pinctrl/sunxi/pinctrl-sunxi.c b/drivers/pinctrl/sunxi/pinctrl-sunxi.c index f1ca75e6d7b1..657c4b21cda8 100644 --- a/drivers/pinctrl/sunxi/pinctrl-sunxi.c +++ b/drivers/pinctrl/sunxi/pinctrl-sunxi.c @@ -573,26 +573,14 @@ static int sunxi_pinctrl_irq_set_type(struct irq_data *d, return 0; } -static void sunxi_pinctrl_irq_mask_ack(struct irq_data *d) +static void sunxi_pinctrl_irq_ack(struct irq_data *d) { struct sunxi_pinctrl *pctl = irq_data_get_irq_chip_data(d); - u32 ctrl_reg = sunxi_irq_ctrl_reg(d->hwirq); - u8 ctrl_idx = sunxi_irq_ctrl_offset(d->hwirq); u32 status_reg = sunxi_irq_status_reg(d->hwirq); u8 status_idx = sunxi_irq_status_offset(d->hwirq); - unsigned long flags; - u32 val; - - spin_lock_irqsave(&pctl->lock, flags); - - /* Mask the IRQ */ - val = readl(pctl->membase + ctrl_reg); - writel(val & ~(1 << ctrl_idx), pctl->membase + ctrl_reg); /* Clear the IRQ */ writel(1 << status_idx, pctl->membase + status_reg); - - spin_unlock_irqrestore(&pctl->lock, flags); } static void sunxi_pinctrl_irq_mask(struct irq_data *d) @@ -638,8 +626,8 @@ static void sunxi_pinctrl_irq_unmask(struct irq_data *d) } static struct irq_chip sunxi_pinctrl_irq_chip = { + .irq_ack = sunxi_pinctrl_irq_ack, .irq_mask = sunxi_pinctrl_irq_mask, - .irq_mask_ack = sunxi_pinctrl_irq_mask_ack, .irq_unmask = sunxi_pinctrl_irq_unmask, .irq_set_type = sunxi_pinctrl_irq_set_type, }; |