Skip to contentSkip to conversation

olympic_open() must be __devinit

PATCH In review Adrian Bunk 2 participants 2 messages Jan 30, 2008 – Feb 11, 2008

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 olympic_open() must be __devinit

This patch fixes the following section mismatch:

<-- snip -->

...
WARNING: drivers/net/built-in.o(.text+0x155573): Section mismatch in reference from the function olympic_open() to the function .devinit.text:olympic_init()
...

<-- snip -->

---
fd1e6e0bb5b17dc85cd24d6263e8751e816f59e6

drivers/net/tokenring/olympic.c +1 -1
index e7b4adc..433c994 100644
@@ -434,7 +434,7 @@ static int __devinit olympic_init(struct net_device *dev)
 
 }
 
-static int olympic_open(struct net_device *dev) 
+static int __devinit olympic_open(struct net_device *dev) 
 {
 	struct olympic_private *olympic_priv=netdev_priv(dev);
 	u8 __iomem *olympic_mmio=olympic_priv->olympic_mmio,*init_srb;
#1 lore raw
Quoted 21 lines · Adrian Bunk

This patch fixes the following section mismatch:

<-- snip -->

...
WARNING: drivers/net/built-in.o(.text+0x155573): Section mismatch in reference from the function olympic_open() to the function .devinit.text:olympic_init()
...

<-- snip -->

---
fd1e6e0bb5b17dc85cd24d6263e8751e816f59e6

drivers/net/tokenring/olympic.c +0 -0
index e7b4adc..433c994 100644

drivers/net/tokenring/olympic.c static int __devinit olympic_init(struct net_device *dev) · line 440

Quoted 8 lines
drivers/net/tokenring/olympic.c +1 -1
@@ -434,7 +434,7 @@ static int __devinit olympic_init(struct net_device *dev)
 
 }
 
-static int olympic_open(struct net_device *dev) 
+static int __devinit olympic_open(struct net_device *dev) 
 {
 	struct olympic_private *olympic_priv=netdev_priv(dev);
 	u8 __iomem *olympic_mmio=olympic_priv->olympic_mmio,*init_srb;

If __devinit marked code is still discarded after initial setup then NACK. open can be called at any time the interface is ifup'ed. Its most definitely not adapter init code (that's all done in probe).

Mike