diff options
Diffstat (limited to 'arch/arm/plat-mxc/irq-common.c')
-rw-r--r-- | arch/arm/plat-mxc/irq-common.c | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/arch/arm/plat-mxc/irq-common.c b/arch/arm/plat-mxc/irq-common.c index 96953e2e4f11..b6e11458e5ae 100644 --- a/arch/arm/plat-mxc/irq-common.c +++ b/arch/arm/plat-mxc/irq-common.c | |||
@@ -23,17 +23,17 @@ | |||
23 | 23 | ||
24 | int imx_irq_set_priority(unsigned char irq, unsigned char prio) | 24 | int imx_irq_set_priority(unsigned char irq, unsigned char prio) |
25 | { | 25 | { |
26 | struct mxc_irq_chip *chip; | 26 | struct irq_chip_generic *gc; |
27 | struct irq_chip *base; | 27 | struct mxc_extra_irq *exirq; |
28 | int ret; | 28 | int ret; |
29 | 29 | ||
30 | ret = -ENOSYS; | 30 | ret = -ENOSYS; |
31 | 31 | ||
32 | base = irq_get_chip(irq); | 32 | gc = irq_get_chip_data(irq); |
33 | if (base) { | 33 | if (gc && gc->private) { |
34 | chip = container_of(base, struct mxc_irq_chip, base); | 34 | exirq = gc->private; |
35 | if (chip->set_priority) | 35 | if (exirq->set_priority) |
36 | ret = chip->set_priority(irq, prio); | 36 | ret = exirq->set_priority(irq, prio); |
37 | } | 37 | } |
38 | 38 | ||
39 | return ret; | 39 | return ret; |
@@ -43,15 +43,16 @@ EXPORT_SYMBOL(imx_irq_set_priority); | |||
43 | int mxc_set_irq_fiq(unsigned int irq, unsigned int type) | 43 | int mxc_set_irq_fiq(unsigned int irq, unsigned int type) |
44 | { | 44 | { |
45 | struct irq_chip_generic *gc; | 45 | struct irq_chip_generic *gc; |
46 | int (*set_irq_fiq)(unsigned int, unsigned int); | 46 | struct mxc_extra_irq *exirq; |
47 | int ret; | 47 | int ret; |
48 | 48 | ||
49 | ret = -ENOSYS; | 49 | ret = -ENOSYS; |
50 | 50 | ||
51 | gc = irq_get_chip_data(irq); | 51 | gc = irq_get_chip_data(irq); |
52 | if (gc && gc->private) { | 52 | if (gc && gc->private) { |
53 | set_irq_fiq = gc->private; | 53 | exirq = gc->private; |
54 | ret = set_irq_fiq(irq, type); | 54 | if (exirq->set_irq_fiq) |
55 | ret = exirq->set_irq_fiq(irq, type); | ||
55 | } | 56 | } |
56 | 57 | ||
57 | return ret; | 58 | return ret; |