3c515: fix using pnp_get_resource when CONFIG_ISAPNP=n
authorRandy Dunlap <randy.dunlap@oracle.com>
Fri, 16 May 2008 17:35:24 +0000 (10:35 -0700)
committerJeff Garzik <jgarzik@redhat.com>
Thu, 22 May 2008 10:34:34 +0000 (06:34 -0400)
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>
drivers/net/3c515.c

index 105a8c7ca7e9dce46ab3aae935db671df7949b8f..e4e3241628d615bb752d99c3cfc18c2ab4e0124e 100644 (file)
@@ -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;