提交 800fb3dd 编写于 作者: M Mike Frysinger 提交者: Paul Mundt

sh: dma: fix request_irq usage

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 7f47c718.
Signed-off-by: NMike Frysinger <vapier@gentoo.org>
Signed-off-by: NPaul Mundt <lethal@linux-sh.org>
上级 f4ba394c
...@@ -335,7 +335,7 @@ static int dmae_irq_init(void) ...@@ -335,7 +335,7 @@ static int dmae_irq_init(void)
for (n = 0; n < NR_DMAE; n++) { for (n = 0; n < NR_DMAE; n++) {
int i = request_irq(get_dma_error_irq(n), dma_err, 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)) { if (unlikely(i < 0)) {
printk(KERN_ERR "%s request_irq fail\n", dmae_name[n]); printk(KERN_ERR "%s request_irq fail\n", dmae_name[n]);
return i; return i;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册