aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mfd
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2011-03-25 07:12:26 -0400
committerSamuel Ortiz <sameo@linux.intel.com>2011-03-26 19:09:40 -0400
commit52a7d60775aa447b3a3dc685b7006f7cdc7835dd (patch)
tree1cc03d7e782569a666ac90f1e869dbfacce1a41d /drivers/mfd
parentfc498fa29c725a0f0fc5ed359db0e3ed33f4ed52 (diff)
mfd: asic3: Cleanup irq handling
Remove the open coded access to irq_desc and use the proper wrappers. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'drivers/mfd')
-rw-r--r--drivers/mfd/asic3.c17
1 files changed, 6 insertions, 11 deletions
diff --git a/drivers/mfd/asic3.c b/drivers/mfd/asic3.c
index 0241f08fc00d..652bde5a5adc 100644
--- a/drivers/mfd/asic3.c
+++ b/drivers/mfd/asic3.c
@@ -139,13 +139,12 @@ static void asic3_irq_flip_edge(struct asic3 *asic,
139 139
140static void asic3_irq_demux(unsigned int irq, struct irq_desc *desc) 140static void asic3_irq_demux(unsigned int irq, struct irq_desc *desc)
141{ 141{
142 struct asic3 *asic = irq_desc_get_handler_data(desc);
143 struct irq_data *data = irq_desc_get_irq_data(desc);
142 int iter, i; 144 int iter, i;
143 unsigned long flags; 145 unsigned long flags;
144 struct asic3 *asic;
145
146 desc->irq_data.chip->irq_ack(&desc->irq_data);
147 146
148 asic = get_irq_data(irq); 147 data->chip->irq_ack(irq_data);
149 148
150 for (iter = 0 ; iter < MAX_ASIC_ISR_LOOPS; iter++) { 149 for (iter = 0 ; iter < MAX_ASIC_ISR_LOOPS; iter++) {
151 u32 status; 150 u32 status;
@@ -188,8 +187,7 @@ static void asic3_irq_demux(unsigned int irq, struct irq_desc *desc)
188 irqnr = asic->irq_base + 187 irqnr = asic->irq_base +
189 (ASIC3_GPIOS_PER_BANK * bank) 188 (ASIC3_GPIOS_PER_BANK * bank)
190 + i; 189 + i;
191 desc = irq_to_desc(irqnr); 190 generic_handle_irq(irqnr);
192 desc->handle_irq(irqnr, desc);
193 if (asic->irq_bothedge[bank] & bit) 191 if (asic->irq_bothedge[bank] & bit)
194 asic3_irq_flip_edge(asic, base, 192 asic3_irq_flip_edge(asic, base,
195 bit); 193 bit);
@@ -200,11 +198,8 @@ static void asic3_irq_demux(unsigned int irq, struct irq_desc *desc)
200 /* Handle remaining IRQs in the status register */ 198 /* Handle remaining IRQs in the status register */
201 for (i = ASIC3_NUM_GPIOS; i < ASIC3_NR_IRQS; i++) { 199 for (i = ASIC3_NUM_GPIOS; i < ASIC3_NR_IRQS; i++) {
202 /* They start at bit 4 and go up */ 200 /* They start at bit 4 and go up */
203 if (status & (1 << (i - ASIC3_NUM_GPIOS + 4))) { 201 if (status & (1 << (i - ASIC3_NUM_GPIOS + 4)))
204 desc = irq_to_desc(asic->irq_base + i); 202 generic_handle_irq(asic->irq_base + i);
205 desc->handle_irq(asic->irq_base + i,
206 desc);
207 }
208 } 203 }
209 } 204 }
210 205