Skip to content

Commit ba94724

Browse files
afzalmamKAGA-KOKO
authored andcommitted
unicore32: Replace setup_irq() by request_irq()
request_irq() is preferred over setup_irq(). Invocations of setup_irq() occur after memory allocators are ready. setup_irq() was required in older kernels as the memory allocator was not available during early boot. Hence replace setup_irq() by request_irq(). Signed-off-by: afzal mohammed <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]> Link: https://lkml.kernel.org/r/82667ae23520611b2a9d8db77e1d8aeb982f08e5.1585320721.git.afzal.mohd.ma@gmail.com
1 parent 5497fce commit ba94724

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

arch/unicore32/kernel/time.c

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -72,13 +72,6 @@ static struct clocksource cksrc_puv3_oscr = {
7272
.flags = CLOCK_SOURCE_IS_CONTINUOUS,
7373
};
7474

75-
static struct irqaction puv3_timer_irq = {
76-
.name = "ost0",
77-
.flags = IRQF_TIMER | IRQF_IRQPOLL,
78-
.handler = puv3_ost0_interrupt,
79-
.dev_id = &ckevt_puv3_osmr0,
80-
};
81-
8275
void __init time_init(void)
8376
{
8477
writel(0, OST_OIER); /* disable any timer interrupts */
@@ -94,7 +87,9 @@ void __init time_init(void)
9487
ckevt_puv3_osmr0.min_delta_ticks = MIN_OSCR_DELTA * 2;
9588
ckevt_puv3_osmr0.cpumask = cpumask_of(0);
9689

97-
setup_irq(IRQ_TIMER0, &puv3_timer_irq);
90+
if (request_irq(IRQ_TIMER0, puv3_ost0_interrupt,
91+
IRQF_TIMER | IRQF_IRQPOLL, "ost0", &ckevt_puv3_osmr0))
92+
pr_err("Failed to register ost0 interrupt\n");
9893

9994
clocksource_register_hz(&cksrc_puv3_oscr, CLOCK_TICK_RATE);
10095
clockevents_register_device(&ckevt_puv3_osmr0);

0 commit comments

Comments
 (0)