Skip to content

Commit

Permalink
arch/sh/drivers/dma/{dma-g2,dmabrg}.c: ensure arguments to request_ir…
Browse files Browse the repository at this point in the history
…q and free_irq are compatible

Convert calls to free_irq so that the second argument is the same as the
last argument of the corresponding call to request_irq.  Without this
property, free_irq does nothing.

In the case of dmabrg.c the change is merely cosmetic - changing 0 to NULL.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
  • Loading branch information
Julia Lawall authored and Paul Mundt committed Mar 15, 2012
1 parent f1cbd03 commit 691c01c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions arch/sh/drivers/dma/dma-g2.c
Original file line number Diff line number Diff line change
Expand Up @@ -181,14 +181,14 @@ static int __init g2_dma_init(void)

ret = register_dmac(&g2_dma_info);
if (unlikely(ret != 0))
free_irq(HW_EVENT_G2_DMA, 0);
free_irq(HW_EVENT_G2_DMA, &g2_dma_info);

return ret;
}

static void __exit g2_dma_exit(void)
{
free_irq(HW_EVENT_G2_DMA, 0);
free_irq(HW_EVENT_G2_DMA, &g2_dma_info);
unregister_dmac(&g2_dma_info);
}

Expand Down
4 changes: 2 additions & 2 deletions arch/sh/drivers/dma/dmabrg.c
Original file line number Diff line number Diff line change
Expand Up @@ -189,8 +189,8 @@ static int __init dmabrg_init(void)
if (ret == 0)
return ret;

free_irq(DMABRGI1, 0);
out1: free_irq(DMABRGI0, 0);
free_irq(DMABRGI1, NULL);
out1: free_irq(DMABRGI0, NULL);
out0: kfree(dmabrg_handlers);
return ret;
}
Expand Down

0 comments on commit 691c01c

Please sign in to comment.