]> git.neil.brown.name Git - history.git/commitdiff
[NET]: Mark init_etherdev() as deprecated.
authorStephen Hemminger <shemminger@osdl.org>
Thu, 16 Oct 2003 18:03:12 +0000 (11:03 -0700)
committerStephen Hemminger <shemminger@osdl.org>
Thu, 16 Oct 2003 18:03:12 +0000 (11:03 -0700)
drivers/net/net_init.c
include/linux/etherdevice.h

index 0a5706e6c41d1b219397d528b79b0934b6b41bd3..a61eac6cc10e6d94727864a8e7d36fb5c8ee3805 100644 (file)
@@ -197,9 +197,13 @@ static struct net_device *init_netdev(struct net_device *dev, int sizeof_priv,
  *
  * If an empty string area is passed as dev->name, or a new structure is made,
  * a new name string is constructed.
+ *
+ * Deprecated because of exposed window between device registration 
+ * and interfaces pointers that need to be set by driver.
+ * Use alloc_etherdev and register_netdev instead.
  */
 
-struct net_device *init_etherdev(struct net_device *dev, int sizeof_priv)
+struct net_device *__init_etherdev(struct net_device *dev, int sizeof_priv)
 {
        return init_netdev(dev, sizeof_priv, "eth%d", ether_setup);
 }
@@ -222,7 +226,7 @@ struct net_device *alloc_etherdev(int sizeof_priv)
        return alloc_netdev(sizeof_priv, "eth%d", ether_setup);
 }
 
-EXPORT_SYMBOL(init_etherdev);
+EXPORT_SYMBOL(__init_etherdev);
 EXPORT_SYMBOL(alloc_etherdev);
 
 static int eth_mac_addr(struct net_device *dev, void *p)
index d3b49237ed50d91f8b51b4c871eaf029758243af..9cba9322d850310c15fe307079e1522ec59a324f 100644 (file)
@@ -38,7 +38,13 @@ extern int           eth_header_cache(struct neighbour *neigh,
                                         struct hh_cache *hh);
 extern int             eth_header_parse(struct sk_buff *skb,
                                         unsigned char *haddr);
-extern struct net_device *init_etherdev(struct net_device *dev, int sizeof_priv);
+extern struct net_device *__init_etherdev(struct net_device *dev, int sizeof_priv);
+static inline __deprecated struct net_device *init_etherdev(struct net_device *dev,
+                                                           int sizeof_priv)
+{
+       return __init_etherdev(dev, sizeof_priv);
+}
+
 extern struct net_device *alloc_etherdev(int sizeof_priv);
 static inline void eth_copy_and_sum (struct sk_buff *dest, unsigned char *src, int len, int base)
 {