MIPS: 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(). remove_irq() has been replaced by free_irq() as well. There were build error's during previous version, couple of which was reported by kbuild test robot <lkp@intel.com> of which one was reported by Thomas Bogendoerfer <tsbogend@alpha.franken.de> as well. There were a few more issues including build errors, those also have been fixed. [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: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
This commit is contained in:

committed by
Thomas Bogendoerfer

parent
792a402c28
commit
ac8fd122e0
@@ -72,13 +72,6 @@ static struct clock_event_device au1x_rtcmatch2_clockdev = {
|
||||
.cpumask = cpu_possible_mask,
|
||||
};
|
||||
|
||||
static struct irqaction au1x_rtcmatch2_irqaction = {
|
||||
.handler = au1x_rtcmatch2_irq,
|
||||
.flags = IRQF_TIMER,
|
||||
.name = "timer",
|
||||
.dev_id = &au1x_rtcmatch2_clockdev,
|
||||
};
|
||||
|
||||
static int __init alchemy_time_init(unsigned int m2int)
|
||||
{
|
||||
struct clock_event_device *cd = &au1x_rtcmatch2_clockdev;
|
||||
@@ -130,7 +123,9 @@ static int __init alchemy_time_init(unsigned int m2int)
|
||||
cd->min_delta_ns = clockevent_delta2ns(9, cd);
|
||||
cd->min_delta_ticks = 9; /* ~0.28ms */
|
||||
clockevents_register_device(cd);
|
||||
setup_irq(m2int, &au1x_rtcmatch2_irqaction);
|
||||
if (request_irq(m2int, au1x_rtcmatch2_irq, IRQF_TIMER, "timer",
|
||||
&au1x_rtcmatch2_clockdev))
|
||||
pr_err("Failed to register timer interrupt\n");
|
||||
|
||||
printk(KERN_INFO "Alchemy clocksource installed\n");
|
||||
|
||||
|
Reference in New Issue
Block a user