Skip to content

Commit

Permalink
3c515: fix using pnp_get_resource when CONFIG_ISAPNP=n
Browse files Browse the repository at this point in the history
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: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
  • Loading branch information
Randy Dunlap authored and Jeff Garzik committed May 22, 2008
1 parent 1b0771a commit 92fbc1c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/net/3c515.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 92fbc1c

Please sign in to comment.