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

ARM: cns3xxx: 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

Link: https://lore.kernel.org/r/20200327124422.4181-1-afzal.mohd.ma@gmail.com
Signed-off-by: afzal mohammed <afzal.mohd.ma@gmail.com>
Acked-by: Krzysztof Halasa <khalasa@piap.pl>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>

authored by

afzal mohammed and committed by
Arnd Bergmann
4c819924 c84e4899

+3 -7
+3 -7
arch/arm/mach-cns3xxx/core.c
··· 189 189 return IRQ_HANDLED; 190 190 } 191 191 192 - static struct irqaction cns3xxx_timer_irq = { 193 - .name = "timer", 194 - .flags = IRQF_TIMER | IRQF_IRQPOLL, 195 - .handler = cns3xxx_timer_interrupt, 196 - }; 197 - 198 192 /* 199 193 * Set up the clock source and clock events devices 200 194 */ ··· 239 245 writel(val, cns3xxx_tmr1 + TIMER1_2_CONTROL_OFFSET); 240 246 241 247 /* Make irqs happen for the system timer */ 242 - setup_irq(timer_irq, &cns3xxx_timer_irq); 248 + if (request_irq(timer_irq, cns3xxx_timer_interrupt, 249 + IRQF_TIMER | IRQF_IRQPOLL, "timer", NULL)) 250 + pr_err("Failed to request irq %d (timer)\n", timer_irq); 243 251 244 252 cns3xxx_clockevents_init(timer_irq); 245 253 }