3c515: fix using pnp_get_resource when CONFIG_ISAPNP=n
Subsystems (3)
PATCH 1/1 3c515: fix using pnp_get_resource when CONFIG_ISAPNP=n
From: Randy Dunlap <[email protected]>
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'
--- drivers/net/3c515.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/net/3c515.c +4 -0
@@ -572,12 +572,16 @@ static int corkscrew_setup(struct net_deint 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;
Quoted 9 lines · Randy Dunlap
From: Randy Dunlap <[email protected]>
3c515.cusespnp_irq(), which callspnp_get_resource(), which is not defined whenCONFIG_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 <[email protected]>
Hmm, wonder why my allyesconfig didn't catch this one. I prefer CONFIG_PNP to __ISAPNP__ in general, but I see you're just following the other tests in the same file.
Thanks!
Quoted 24 lines
--- drivers/net/3c515.c | 4 ++++ 1 file changed, 4 insertions(+)drivers/net/3c515.c +4
-0@@ -572,12 +572,16 @@ static int corkscrew_setup(struct net_deint 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;
Quoted 7 lines · Bjorn Helgaas
Quoted 6 lines · Randy Dunlap
From: Randy Dunlap <[email protected]>
3c515.cusespnp_irq(), which callspnp_get_resource(), which is not defined whenCONFIG_PNP=n, so in that case, get the IRQ from a hardware register.
Quoted 5 lines
Quoted 3 lines
3c515.c:(.text+0x3adc0): undefined reference to `pnp_get_resource'
Signed-off-by Randy Dunlap <[email protected]>Hmm, wonder why my allyesconfig didn't catch this one.
Because parts of it are =n. :)
Quoted 2 lines
I prefer
CONFIG_PNPto__ISAPNP__in general, but I see you're just following the other tests in the same file.
Yes. And it would need to be CONFIG_ISAPNP, not CONFIG_PNP.
Quoted 31 lines
Thanks!
Acked-by Bjorn Helgaas <[email protected]>Quoted 24 lines
--- drivers/net/3c515.c | 4 ++++ 1 file changed, 4 insertions(+)drivers/net/3c515.c +4
-0@@ -572,12 +572,16 @@ static int corkscrew_setup(struct net_deint 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;
Signature · 1 line
~Randy
Quoted 5 lines · Randy Dunlap
Quoted 2 lines · Bjorn Helgaas
I prefer
CONFIG_PNPto__ISAPNP__in general, but I see you're just following the other tests in the same file.Yes. And it would need to be
CONFIG_ISAPNP, notCONFIG_PNP.
Huh. Sure enough. I hadn't even noticed pnp_find_dev(). I'm not sure why pnp_find_dev() should be under CONFIG_ISAPNP rather than CONFIG_PNP, other than the fact that it uses ISAPNP_ANY_ID.
On the other hand, there are only 25-30 users of pnp_find_dev(); maybe I should just look at converting them and nuking the compat interfaces completely.
Bjorn
Jeff Garzik
AppliedQuoted 11 lines · Randy Dunlap
From: Randy Dunlap <[email protected]>
3c515.cusespnp_irq(), which callspnp_get_resource(), which is not defined whenCONFIG_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 <[email protected]>--- drivers/net/3c515.c | 4 ++++
applied