Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ARM: orion: 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>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Gregory CLEMENT <gregory.clement@bootlin.com>

authored by

afzal mohammed and committed by
Gregory CLEMENT
37b146e3 cf8dcf27

+3 -7
+3 -7
arch/arm/plat-orion/time.c
··· 177 177 return IRQ_HANDLED; 178 178 } 179 179 180 - static struct irqaction orion_timer_irq = { 181 - .name = "orion_tick", 182 - .flags = IRQF_TIMER, 183 - .handler = orion_timer_interrupt 184 - }; 185 - 186 180 void __init 187 181 orion_time_set_base(void __iomem *_timer_base) 188 182 { ··· 230 236 /* 231 237 * Setup clockevent timer (interrupt-driven). 232 238 */ 233 - setup_irq(irq, &orion_timer_irq); 239 + if (request_irq(irq, orion_timer_interrupt, IRQF_TIMER, "orion_tick", 240 + NULL)) 241 + pr_err("Failed to request irq %u (orion_tick)\n", irq); 234 242 orion_clkevt.cpumask = cpumask_of(0); 235 243 clockevents_config_and_register(&orion_clkevt, tclk, 1, 0xfffffffe); 236 244 }