powerpc: 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>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20200312064256.18735-1-afzal.mohd.ma@gmail.com
This commit is contained in:
afzal mohammed
2020-03-12 12:12:55 +05:30
committed by Michael Ellerman
parent addf3727ad
commit b4f00d5b20
6 changed files with 29 additions and 55 deletions

View File

@@ -451,13 +451,6 @@ static void __init chrp_find_openpic(void)
of_node_put(np);
}
#if defined(CONFIG_VT) && defined(CONFIG_INPUT_ADBHID) && defined(CONFIG_XMON)
static struct irqaction xmon_irqaction = {
.handler = xmon_irq,
.name = "XMON break",
};
#endif
static void __init chrp_find_8259(void)
{
struct device_node *np, *pic = NULL;
@@ -541,8 +534,11 @@ static void __init chrp_init_IRQ(void)
if (of_node_is_type(kbd->parent, "adb"))
break;
of_node_put(kbd);
if (kbd)
setup_irq(HYDRA_INT_ADB_NMI, &xmon_irqaction);
if (kbd) {
if (request_irq(HYDRA_INT_ADB_NMI, xmon_irq, 0, "XMON break",
NULL))
pr_err("Failed to register XMON break interrupt\n");
}
#endif
}