Commit 5497fce7 authored by afzal mohammed's avatar afzal mohammed Committed by Thomas Gleixner

sh: 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: default avatarafzal mohammed <afzal.mohd.ma@gmail.com>
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
Link: https://lkml.kernel.org/r/b060312689820559121ee0a6456bbc1202fb7ee5.1585320721.git.afzal.mohd.ma@gmail.com
parent 45b26dde
...@@ -40,16 +40,6 @@ static irqreturn_t cayman_interrupt_pci2(int irq, void *dev_id) ...@@ -40,16 +40,6 @@ static irqreturn_t cayman_interrupt_pci2(int irq, void *dev_id)
return IRQ_NONE; return IRQ_NONE;
} }
static struct irqaction cayman_action_smsc = {
.name = "Cayman SMSC Mux",
.handler = cayman_interrupt_smsc,
};
static struct irqaction cayman_action_pci2 = {
.name = "Cayman PCI2 Mux",
.handler = cayman_interrupt_pci2,
};
static void enable_cayman_irq(struct irq_data *data) static void enable_cayman_irq(struct irq_data *data)
{ {
unsigned int irq = data->irq; unsigned int irq = data->irq;
...@@ -149,6 +139,10 @@ void init_cayman_irq(void) ...@@ -149,6 +139,10 @@ void init_cayman_irq(void)
} }
/* Setup the SMSC interrupt */ /* Setup the SMSC interrupt */
setup_irq(SMSC_IRQ, &cayman_action_smsc); if (request_irq(SMSC_IRQ, cayman_interrupt_smsc, 0, "Cayman SMSC Mux",
setup_irq(PCI2_IRQ, &cayman_action_pci2); NULL))
pr_err("Failed to register Cayman SMSC Mux interrupt\n");
if (request_irq(PCI2_IRQ, cayman_interrupt_pci2, 0, "Cayman PCI2 Mux",
NULL))
pr_err("Failed to register Cayman PCI2 Mux interrupt\n");
} }
...@@ -64,11 +64,6 @@ static int pvr2_xfer_dma(struct dma_channel *chan) ...@@ -64,11 +64,6 @@ static int pvr2_xfer_dma(struct dma_channel *chan)
return 0; return 0;
} }
static struct irqaction pvr2_dma_irq = {
.name = "pvr2 DMA handler",
.handler = pvr2_dma_interrupt,
};
static struct dma_ops pvr2_dma_ops = { static struct dma_ops pvr2_dma_ops = {
.request = pvr2_request_dma, .request = pvr2_request_dma,
.get_residue = pvr2_get_dma_residue, .get_residue = pvr2_get_dma_residue,
...@@ -84,7 +79,9 @@ static struct dma_info pvr2_dma_info = { ...@@ -84,7 +79,9 @@ static struct dma_info pvr2_dma_info = {
static int __init pvr2_dma_init(void) static int __init pvr2_dma_init(void)
{ {
setup_irq(HW_EVENT_PVR2_DMA, &pvr2_dma_irq); if (request_irq(HW_EVENT_PVR2_DMA, pvr2_dma_interrupt, 0,
"pvr2 DMA handler", NULL))
pr_err("Failed to register pvr2 DMA handler interrupt\n");
request_dma(PVR2_CASCADE_CHAN, "pvr2 cascade"); request_dma(PVR2_CASCADE_CHAN, "pvr2 cascade");
return register_dmac(&pvr2_dma_info); return register_dmac(&pvr2_dma_info);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment