diff options
Diffstat (limited to 'arch/mips/rb532/irq.c')
-rw-r--r-- | arch/mips/rb532/irq.c | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/arch/mips/rb532/irq.c b/arch/mips/rb532/irq.c index ea6cec3c1e0d..b32a768da894 100644 --- a/arch/mips/rb532/irq.c +++ b/arch/mips/rb532/irq.c | |||
@@ -111,10 +111,10 @@ static inline void ack_local_irq(unsigned int ip) | |||
111 | clear_c0_cause(ipnum); | 111 | clear_c0_cause(ipnum); |
112 | } | 112 | } |
113 | 113 | ||
114 | static void rb532_enable_irq(unsigned int irq_nr) | 114 | static void rb532_enable_irq(struct irq_data *d) |
115 | { | 115 | { |
116 | unsigned int group, intr_bit, irq_nr = d->irq; | ||
116 | int ip = irq_nr - GROUP0_IRQ_BASE; | 117 | int ip = irq_nr - GROUP0_IRQ_BASE; |
117 | unsigned int group, intr_bit; | ||
118 | volatile unsigned int *addr; | 118 | volatile unsigned int *addr; |
119 | 119 | ||
120 | if (ip < 0) | 120 | if (ip < 0) |
@@ -132,10 +132,10 @@ static void rb532_enable_irq(unsigned int irq_nr) | |||
132 | } | 132 | } |
133 | } | 133 | } |
134 | 134 | ||
135 | static void rb532_disable_irq(unsigned int irq_nr) | 135 | static void rb532_disable_irq(struct irq_data *d) |
136 | { | 136 | { |
137 | unsigned int group, intr_bit, mask, irq_nr = d->irq; | ||
137 | int ip = irq_nr - GROUP0_IRQ_BASE; | 138 | int ip = irq_nr - GROUP0_IRQ_BASE; |
138 | unsigned int group, intr_bit, mask; | ||
139 | volatile unsigned int *addr; | 139 | volatile unsigned int *addr; |
140 | 140 | ||
141 | if (ip < 0) { | 141 | if (ip < 0) { |
@@ -163,18 +163,18 @@ static void rb532_disable_irq(unsigned int irq_nr) | |||
163 | } | 163 | } |
164 | } | 164 | } |
165 | 165 | ||
166 | static void rb532_mask_and_ack_irq(unsigned int irq_nr) | 166 | static void rb532_mask_and_ack_irq(struct irq_data *d) |
167 | { | 167 | { |
168 | rb532_disable_irq(irq_nr); | 168 | rb532_disable_irq(d); |
169 | ack_local_irq(group_to_ip(irq_to_group(irq_nr))); | 169 | ack_local_irq(group_to_ip(irq_to_group(d->irq))); |
170 | } | 170 | } |
171 | 171 | ||
172 | static int rb532_set_type(unsigned int irq_nr, unsigned type) | 172 | static int rb532_set_type(struct irq_data *d, unsigned type) |
173 | { | 173 | { |
174 | int gpio = irq_nr - GPIO_MAPPED_IRQ_BASE; | 174 | int gpio = d->irq - GPIO_MAPPED_IRQ_BASE; |
175 | int group = irq_to_group(irq_nr); | 175 | int group = irq_to_group(d->irq); |
176 | 176 | ||
177 | if (group != GPIO_MAPPED_IRQ_GROUP || irq_nr > (GROUP4_IRQ_BASE + 13)) | 177 | if (group != GPIO_MAPPED_IRQ_GROUP || d->irq > (GROUP4_IRQ_BASE + 13)) |
178 | return (type == IRQ_TYPE_LEVEL_HIGH) ? 0 : -EINVAL; | 178 | return (type == IRQ_TYPE_LEVEL_HIGH) ? 0 : -EINVAL; |
179 | 179 | ||
180 | switch (type) { | 180 | switch (type) { |
@@ -193,11 +193,11 @@ static int rb532_set_type(unsigned int irq_nr, unsigned type) | |||
193 | 193 | ||
194 | static struct irq_chip rc32434_irq_type = { | 194 | static struct irq_chip rc32434_irq_type = { |
195 | .name = "RB532", | 195 | .name = "RB532", |
196 | .ack = rb532_disable_irq, | 196 | .irq_ack = rb532_disable_irq, |
197 | .mask = rb532_disable_irq, | 197 | .irq_mask = rb532_disable_irq, |
198 | .mask_ack = rb532_mask_and_ack_irq, | 198 | .irq_mask_ack = rb532_mask_and_ack_irq, |
199 | .unmask = rb532_enable_irq, | 199 | .irq_unmask = rb532_enable_irq, |
200 | .set_type = rb532_set_type, | 200 | .irq_set_type = rb532_set_type, |
201 | }; | 201 | }; |
202 | 202 | ||
203 | void __init arch_init_irq(void) | 203 | void __init arch_init_irq(void) |