提交 92fbc1c1 编写于 作者: R Randy Dunlap 提交者: Jeff Garzik

3c515: fix using pnp_get_resource when CONFIG_ISAPNP=n

3c515.c uses pnp_irq(), which calls pnp_get_resource(),
which is not defined when CONFIG_PNP=n, so in that case,
get the IRQ from a hardware register.

3c515.c:(.text+0x3adc0): undefined reference to `pnp_get_resource'
Signed-off-by: NRandy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
上级 1b0771ab
......@@ -572,12 +572,16 @@ static int corkscrew_setup(struct net_device *dev, int ioaddr,
int irq;
DECLARE_MAC_BUF(mac);
#ifdef __ISAPNP__
if (idev) {
irq = pnp_irq(idev, 0);
vp->dev = &idev->dev;
} else {
irq = inw(ioaddr + 0x2002) & 15;
}
#else
irq = inw(ioaddr + 0x2002) & 15;
#endif
dev->base_addr = ioaddr;
dev->irq = irq;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册