ARM: 8965/2: footbridge: replace setup_irq() by request_irq()
request_irq() is preferred over setup_irq(). Invocations of setup_irq() occur after memory allocators are ready. Per tglx[1], setup_irq() existed in olden days when allocators were not ready by the time early interrupts were initialized. Hence replace setup_irq() by request_irq(). [1] https://lkml.kernel.org/r/alpine.DEB.2.20.1710191609480.1971@nanos Signed-off-by: afzal mohammed <afzal.mohd.ma@gmail.com> Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
This commit is contained in:
parent
c51dc14ee6
commit
5926e7e166
|
@ -101,13 +101,6 @@ static irqreturn_t timer1_interrupt(int irq, void *dev_id)
|
|||
return IRQ_HANDLED;
|
||||
}
|
||||
|
||||
static struct irqaction footbridge_timer_irq = {
|
||||
.name = "dc21285_timer1",
|
||||
.handler = timer1_interrupt,
|
||||
.flags = IRQF_TIMER | IRQF_IRQPOLL,
|
||||
.dev_id = &ckevt_dc21285,
|
||||
};
|
||||
|
||||
/*
|
||||
* Set up timer interrupt.
|
||||
*/
|
||||
|
@ -118,7 +111,9 @@ void __init footbridge_timer_init(void)
|
|||
|
||||
clocksource_register_hz(&cksrc_dc21285, rate);
|
||||
|
||||
setup_irq(ce->irq, &footbridge_timer_irq);
|
||||
if (request_irq(ce->irq, timer1_interrupt, IRQF_TIMER | IRQF_IRQPOLL,
|
||||
"dc21285_timer1", &ckevt_dc21285))
|
||||
pr_err("Failed to request irq %d (dc21285_timer1)", ce->irq);
|
||||
|
||||
ce->cpumask = cpumask_of(smp_processor_id());
|
||||
clockevents_config_and_register(ce, rate, 0x4, 0xffffff);
|
||||
|
|
|
@ -96,11 +96,6 @@ static void isa_irq_handler(struct irq_desc *desc)
|
|||
generic_handle_irq(isa_irq);
|
||||
}
|
||||
|
||||
static struct irqaction irq_cascade = {
|
||||
.handler = no_action,
|
||||
.name = "cascade",
|
||||
};
|
||||
|
||||
static struct resource pic1_resource = {
|
||||
.name = "pic1",
|
||||
.start = 0x20,
|
||||
|
@ -160,7 +155,10 @@ void __init isa_init_irq(unsigned int host_irq)
|
|||
|
||||
request_resource(&ioport_resource, &pic1_resource);
|
||||
request_resource(&ioport_resource, &pic2_resource);
|
||||
setup_irq(IRQ_ISA_CASCADE, &irq_cascade);
|
||||
|
||||
irq = IRQ_ISA_CASCADE;
|
||||
if (request_irq(irq, no_action, 0, "cascade", NULL))
|
||||
pr_err("Failed to request irq %u (cascade)\n", irq);
|
||||
|
||||
irq_set_chained_handler(host_irq, isa_irq_handler);
|
||||
|
||||
|
|
|
@ -25,17 +25,12 @@ static irqreturn_t pit_timer_interrupt(int irq, void *dev_id)
|
|||
return IRQ_HANDLED;
|
||||
}
|
||||
|
||||
static struct irqaction pit_timer_irq = {
|
||||
.name = "pit",
|
||||
.handler = pit_timer_interrupt,
|
||||
.flags = IRQF_TIMER | IRQF_IRQPOLL,
|
||||
.dev_id = &i8253_clockevent,
|
||||
};
|
||||
|
||||
void __init isa_timer_init(void)
|
||||
{
|
||||
clocksource_i8253_init();
|
||||
|
||||
setup_irq(i8253_clockevent.irq, &pit_timer_irq);
|
||||
if (request_irq(i8253_clockevent.irq, pit_timer_interrupt,
|
||||
IRQF_TIMER | IRQF_IRQPOLL, "pit", &i8253_clockevent))
|
||||
pr_err("Failed to request irq %d(pit)\n", i8253_clockevent.irq);
|
||||
clockevent_i8253_init(false);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user