Skip to content

Commit

Permalink
sh: dma: fix request_irq usage
Browse files Browse the repository at this point in the history
When calling request_irq with IRQF_SHARED, the dev cookie must be set
(i.e. non-NULL), otherwise the code rejects it immediately with -EINVAL.
So restore the logic here where we'd pass a pointer to the name as a
dummy unique val.

Otherwise, booting up on my LANDISK system would fail with:
	DMAC Address Error0 request_irq fail

This was introduced in commit 7f47c71.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
  • Loading branch information
Mike Frysinger authored and Paul Mundt committed Aug 9, 2012
1 parent f4ba394 commit 800fb3d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/sh/drivers/dma/dma-sh.c
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ static int dmae_irq_init(void)

for (n = 0; n < NR_DMAE; n++) {
int i = request_irq(get_dma_error_irq(n), dma_err,
IRQF_SHARED, dmae_name[n], NULL);
IRQF_SHARED, dmae_name[n], (void *)dmae_name[n]);
if (unlikely(i < 0)) {
printk(KERN_ERR "%s request_irq fail\n", dmae_name[n]);
return i;
Expand Down

0 comments on commit 800fb3d

Please sign in to comment.