aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mfd/ezx-pcap.c
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2011-03-25 07:12:27 -0400
committerSamuel Ortiz <sameo@linux.intel.com>2011-03-26 19:09:42 -0400
commit73a6839fdb7f3f5ac7bfaee0796dd7647b9c9376 (patch)
tree711fc01dce50f711c1a5d2d0a4f4e38cf094769d /drivers/mfd/ezx-pcap.c
parent256d0e2e4553417466ca8213b446954ff1778c2c (diff)
mfd: ezx-pcap: Remvove open coded irq handling
There is no point in checking irq_desc here, as it _is_ available. The driver configured those lines, so they cannot go away. The home brewn disabled/note_interrupt magic can be removed as well by adding a irq_disable callback which avoids the lazy disable. That driver needs to be converted to threaded interrupts. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'drivers/mfd/ezx-pcap.c')
-rw-r--r--drivers/mfd/ezx-pcap.c14
1 files changed, 3 insertions, 11 deletions
diff --git a/drivers/mfd/ezx-pcap.c b/drivers/mfd/ezx-pcap.c
index 9e2d8dd5f9e5..92e6fbc43a14 100644
--- a/drivers/mfd/ezx-pcap.c
+++ b/drivers/mfd/ezx-pcap.c
@@ -162,6 +162,7 @@ static void pcap_unmask_irq(struct irq_data *d)
162 162
163static struct irq_chip pcap_irq_chip = { 163static struct irq_chip pcap_irq_chip = {
164 .name = "pcap", 164 .name = "pcap",
165 .irq_disable = pcap_mask_irq,
165 .irq_mask = pcap_mask_irq, 166 .irq_mask = pcap_mask_irq,
166 .irq_unmask = pcap_unmask_irq, 167 .irq_unmask = pcap_unmask_irq,
167}; 168};
@@ -196,17 +197,8 @@ static void pcap_isr_work(struct work_struct *work)
196 local_irq_disable(); 197 local_irq_disable();
197 service = isr & ~msr; 198 service = isr & ~msr;
198 for (irq = pcap->irq_base; service; service >>= 1, irq++) { 199 for (irq = pcap->irq_base; service; service >>= 1, irq++) {
199 if (service & 1) { 200 if (service & 1)
200 struct irq_desc *desc = irq_to_desc(irq); 201 generic_handle_irq(irq);
201
202 if (WARN(!desc, "Invalid PCAP IRQ %d\n", irq))
203 break;
204
205 if (desc->status & IRQ_DISABLED)
206 note_interrupt(irq, desc, IRQ_NONE);
207 else
208 desc->handle_irq(irq, desc);
209 }
210 } 202 }
211 local_irq_enable(); 203 local_irq_enable();
212 ezx_pcap_write(pcap, PCAP_REG_MSR, pcap->msr); 204 ezx_pcap_write(pcap, PCAP_REG_MSR, pcap->msr);