Commit 52a7d607 authored by Thomas Gleixner's avatar Thomas Gleixner Committed by Samuel Ortiz

mfd: asic3: Cleanup irq handling

Remove the open coded access to irq_desc and use the proper wrappers.
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
Signed-off-by: default avatarSamuel Ortiz <sameo@linux.intel.com>
parent fc498fa2
...@@ -139,13 +139,12 @@ static void asic3_irq_flip_edge(struct asic3 *asic, ...@@ -139,13 +139,12 @@ static void asic3_irq_flip_edge(struct asic3 *asic,
static void asic3_irq_demux(unsigned int irq, struct irq_desc *desc) static void asic3_irq_demux(unsigned int irq, struct irq_desc *desc)
{ {
struct asic3 *asic = irq_desc_get_handler_data(desc);
struct irq_data *data = irq_desc_get_irq_data(desc);
int iter, i; int iter, i;
unsigned long flags; unsigned long flags;
struct asic3 *asic;
desc->irq_data.chip->irq_ack(&desc->irq_data);
asic = get_irq_data(irq); data->chip->irq_ack(irq_data);
for (iter = 0 ; iter < MAX_ASIC_ISR_LOOPS; iter++) { for (iter = 0 ; iter < MAX_ASIC_ISR_LOOPS; iter++) {
u32 status; u32 status;
...@@ -188,8 +187,7 @@ static void asic3_irq_demux(unsigned int irq, struct irq_desc *desc) ...@@ -188,8 +187,7 @@ static void asic3_irq_demux(unsigned int irq, struct irq_desc *desc)
irqnr = asic->irq_base + irqnr = asic->irq_base +
(ASIC3_GPIOS_PER_BANK * bank) (ASIC3_GPIOS_PER_BANK * bank)
+ i; + i;
desc = irq_to_desc(irqnr); generic_handle_irq(irqnr);
desc->handle_irq(irqnr, desc);
if (asic->irq_bothedge[bank] & bit) if (asic->irq_bothedge[bank] & bit)
asic3_irq_flip_edge(asic, base, asic3_irq_flip_edge(asic, base,
bit); bit);
...@@ -200,11 +198,8 @@ static void asic3_irq_demux(unsigned int irq, struct irq_desc *desc) ...@@ -200,11 +198,8 @@ static void asic3_irq_demux(unsigned int irq, struct irq_desc *desc)
/* Handle remaining IRQs in the status register */ /* Handle remaining IRQs in the status register */
for (i = ASIC3_NUM_GPIOS; i < ASIC3_NR_IRQS; i++) { for (i = ASIC3_NUM_GPIOS; i < ASIC3_NR_IRQS; i++) {
/* They start at bit 4 and go up */ /* They start at bit 4 and go up */
if (status & (1 << (i - ASIC3_NUM_GPIOS + 4))) { if (status & (1 << (i - ASIC3_NUM_GPIOS + 4)))
desc = irq_to_desc(asic->irq_base + i); generic_handle_irq(asic->irq_base + i);
desc->handle_irq(asic->irq_base + i,
desc);
}
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment