Skip to content

Commit 5497fce

Browse files
afzalmamKAGA-KOKO
authored andcommitted
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: afzal mohammed <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]> Link: https://lkml.kernel.org/r/b060312689820559121ee0a6456bbc1202fb7ee5.1585320721.git.afzal.mohd.ma@gmail.com
1 parent 45b26dd commit 5497fce

File tree

2 files changed

+9
-18
lines changed

2 files changed

+9
-18
lines changed

arch/sh/boards/mach-cayman/irq.c

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -40,16 +40,6 @@ static irqreturn_t cayman_interrupt_pci2(int irq, void *dev_id)
4040
return IRQ_NONE;
4141
}
4242

43-
static struct irqaction cayman_action_smsc = {
44-
.name = "Cayman SMSC Mux",
45-
.handler = cayman_interrupt_smsc,
46-
};
47-
48-
static struct irqaction cayman_action_pci2 = {
49-
.name = "Cayman PCI2 Mux",
50-
.handler = cayman_interrupt_pci2,
51-
};
52-
5343
static void enable_cayman_irq(struct irq_data *data)
5444
{
5545
unsigned int irq = data->irq;
@@ -149,6 +139,10 @@ void init_cayman_irq(void)
149139
}
150140

151141
/* Setup the SMSC interrupt */
152-
setup_irq(SMSC_IRQ, &cayman_action_smsc);
153-
setup_irq(PCI2_IRQ, &cayman_action_pci2);
142+
if (request_irq(SMSC_IRQ, cayman_interrupt_smsc, 0, "Cayman SMSC Mux",
143+
NULL))
144+
pr_err("Failed to register Cayman SMSC Mux interrupt\n");
145+
if (request_irq(PCI2_IRQ, cayman_interrupt_pci2, 0, "Cayman PCI2 Mux",
146+
NULL))
147+
pr_err("Failed to register Cayman PCI2 Mux interrupt\n");
154148
}

arch/sh/drivers/dma/dma-pvr2.c

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -64,11 +64,6 @@ static int pvr2_xfer_dma(struct dma_channel *chan)
6464
return 0;
6565
}
6666

67-
static struct irqaction pvr2_dma_irq = {
68-
.name = "pvr2 DMA handler",
69-
.handler = pvr2_dma_interrupt,
70-
};
71-
7267
static struct dma_ops pvr2_dma_ops = {
7368
.request = pvr2_request_dma,
7469
.get_residue = pvr2_get_dma_residue,
@@ -84,7 +79,9 @@ static struct dma_info pvr2_dma_info = {
8479

8580
static int __init pvr2_dma_init(void)
8681
{
87-
setup_irq(HW_EVENT_PVR2_DMA, &pvr2_dma_irq);
82+
if (request_irq(HW_EVENT_PVR2_DMA, pvr2_dma_interrupt, 0,
83+
"pvr2 DMA handler", NULL))
84+
pr_err("Failed to register pvr2 DMA handler interrupt\n");
8885
request_dma(PVR2_CASCADE_CHAN, "pvr2 cascade");
8986

9087
return register_dmac(&pvr2_dma_info);

0 commit comments

Comments
 (0)