mirror of
https://github.com/torvalds/linux.git
synced 2024-12-31 23:31:29 +00:00
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>
This commit is contained in:
parent
256d0e2e45
commit
73a6839fdb
@ -162,6 +162,7 @@ static void pcap_unmask_irq(struct irq_data *d)
|
|||||||
|
|
||||||
static struct irq_chip pcap_irq_chip = {
|
static struct irq_chip pcap_irq_chip = {
|
||||||
.name = "pcap",
|
.name = "pcap",
|
||||||
|
.irq_disable = pcap_mask_irq,
|
||||||
.irq_mask = pcap_mask_irq,
|
.irq_mask = pcap_mask_irq,
|
||||||
.irq_unmask = pcap_unmask_irq,
|
.irq_unmask = pcap_unmask_irq,
|
||||||
};
|
};
|
||||||
@ -196,17 +197,8 @@ static void pcap_isr_work(struct work_struct *work)
|
|||||||
local_irq_disable();
|
local_irq_disable();
|
||||||
service = isr & ~msr;
|
service = isr & ~msr;
|
||||||
for (irq = pcap->irq_base; service; service >>= 1, irq++) {
|
for (irq = pcap->irq_base; service; service >>= 1, irq++) {
|
||||||
if (service & 1) {
|
if (service & 1)
|
||||||
struct irq_desc *desc = irq_to_desc(irq);
|
generic_handle_irq(irq);
|
||||||
|
|
||||||
if (WARN(!desc, "Invalid PCAP IRQ %d\n", irq))
|
|
||||||
break;
|
|
||||||
|
|
||||||
if (desc->status & IRQ_DISABLED)
|
|
||||||
note_interrupt(irq, desc, IRQ_NONE);
|
|
||||||
else
|
|
||||||
desc->handle_irq(irq, desc);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
local_irq_enable();
|
local_irq_enable();
|
||||||
ezx_pcap_write(pcap, PCAP_REG_MSR, pcap->msr);
|
ezx_pcap_write(pcap, PCAP_REG_MSR, pcap->msr);
|
||||||
|
Loading…
Reference in New Issue
Block a user