summaryrefslogtreecommitdiff
path: root/drivers/irqchip/irq-nvic.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2015-11-27 15:40:20 +0300
committerTakashi Iwai <tiwai@suse.de>2015-11-27 15:40:20 +0300
commit06a691e64b11323a735db3c3bd909d3c0712698f (patch)
treee60b5a230fc2ea6e0f514d878d322a1f8e101c57 /drivers/irqchip/irq-nvic.c
parent0c25ad80408e95e0a4fbaf0056950206e95f726f (diff)
parent923f1cbf2e45f6292a01de959031a8efeabede78 (diff)
downloadlinux-06a691e64b11323a735db3c3bd909d3c0712698f.tar.xz
Merge tag 'asoc-fix-v4.4-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus
ASoC: Fixes for v4.4 Quite a large batch of fixes have come in since the merge window, mainly driver specific ones but there's a couple of core ones: - A fix for DAPM resume on active streams to ensure everything ends up cleanly in the right state. - Reset the DAPM cache when freeing widgets to fix a crash on driver remove and reload. The PM functions for nau8825 are new code which fix crashes on resume.
Diffstat (limited to 'drivers/irqchip/irq-nvic.c')
-rw-r--r--drivers/irqchip/irq-nvic.c18
1 files changed, 14 insertions, 4 deletions
diff --git a/drivers/irqchip/irq-nvic.c b/drivers/irqchip/irq-nvic.c
index a878b8d03868..b1777104fd9f 100644
--- a/drivers/irqchip/irq-nvic.c
+++ b/drivers/irqchip/irq-nvic.c
@@ -48,16 +48,26 @@ nvic_handle_irq(irq_hw_number_t hwirq, struct pt_regs *regs)
handle_IRQ(irq, regs);
}
+static int nvic_irq_domain_translate(struct irq_domain *d,
+ struct irq_fwspec *fwspec,
+ unsigned long *hwirq, unsigned int *type)
+{
+ if (WARN_ON(fwspec->param_count < 1))
+ return -EINVAL;
+ *hwirq = fwspec->param[0];
+ *type = IRQ_TYPE_NONE;
+ return 0;
+}
+
static int nvic_irq_domain_alloc(struct irq_domain *domain, unsigned int virq,
unsigned int nr_irqs, void *arg)
{
int i, ret;
irq_hw_number_t hwirq;
unsigned int type = IRQ_TYPE_NONE;
- struct of_phandle_args *irq_data = arg;
+ struct irq_fwspec *fwspec = arg;
- ret = irq_domain_xlate_onecell(domain, irq_data->np, irq_data->args,
- irq_data->args_count, &hwirq, &type);
+ ret = nvic_irq_domain_translate(domain, fwspec, &hwirq, &type);
if (ret)
return ret;
@@ -68,7 +78,7 @@ static int nvic_irq_domain_alloc(struct irq_domain *domain, unsigned int virq,
}
static const struct irq_domain_ops nvic_irq_domain_ops = {
- .xlate = irq_domain_xlate_onecell,
+ .translate = nvic_irq_domain_translate,
.alloc = nvic_irq_domain_alloc,
.free = irq_domain_free_irqs_top,
};