Skip to content

Commit 9fd1a1c

Browse files
afzalmamMichal Simek
authored andcommitted
microblaze: 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 <[email protected]> Signed-off-by: Michal Simek <[email protected]>
1 parent 1babf55 commit 9fd1a1c

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

arch/microblaze/kernel/timer.c

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -161,13 +161,6 @@ static irqreturn_t timer_interrupt(int irq, void *dev_id)
161161
return IRQ_HANDLED;
162162
}
163163

164-
static struct irqaction timer_irqaction = {
165-
.handler = timer_interrupt,
166-
.flags = IRQF_TIMER,
167-
.name = "timer",
168-
.dev_id = &clockevent_xilinx_timer,
169-
};
170-
171164
static __init int xilinx_clockevent_init(void)
172165
{
173166
clockevent_xilinx_timer.mult =
@@ -309,7 +302,8 @@ static int __init xilinx_timer_init(struct device_node *timer)
309302

310303
freq_div_hz = timer_clock_freq / HZ;
311304

312-
ret = setup_irq(irq, &timer_irqaction);
305+
ret = request_irq(irq, timer_interrupt, IRQF_TIMER, "timer",
306+
&clockevent_xilinx_timer);
313307
if (ret) {
314308
pr_err("Failed to setup IRQ");
315309
return ret;

0 commit comments

Comments
 (0)