提交 d5ccd67b 编写于 作者: R Russell King - ARM Linux 提交者: David S. Miller

NET: smc91x: Fix irq flags

smc91x.h defines SMC_IRQ_FLAGS to be -1 when it wants the interrupt
flags to be taken from the resource structure.  However, d280eadc
changed this to checking for non-zero resource flags.

Unfortunately, this means that on some platforms, we end up passing
'-1' to request_irq rather than the desired result.  Combine the two
conditions into one so that the IRQ flags are taken from the resource
if either SMC_IRQ_FLAGS is -1 or the resource flags specify an
interrupt trigger.

This restores network on at least the Versatile platform.
Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
Acked-by: NEric Miao <eric.y.miao@gmail.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 6c53b1b1
...@@ -2283,7 +2283,7 @@ static int __devinit smc_drv_probe(struct platform_device *pdev) ...@@ -2283,7 +2283,7 @@ static int __devinit smc_drv_probe(struct platform_device *pdev)
ndev->irq = ires->start; ndev->irq = ires->start;
if (ires->flags & IRQF_TRIGGER_MASK) if (irq_flags == -1 || ires->flags & IRQF_TRIGGER_MASK)
irq_flags = ires->flags & IRQF_TRIGGER_MASK; irq_flags = ires->flags & IRQF_TRIGGER_MASK;
ret = smc_request_attrib(pdev, ndev); ret = smc_request_attrib(pdev, ndev);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册