summaryrefslogtreecommitdiff
path: root/net/core/dev.c
diff options
context:
space:
mode:
authorAlexander Viro <viro@parcelfarce.linux.theplanet.co.uk>2004-02-25 14:36:58 -0500
committerChristoph Hellwig <hch@sgi.com>2004-02-25 14:36:58 -0500
commit29d55497eb6a4929c81fd4177e8de02411d48b90 (patch)
treeebdacc4c145689577c0d571cc4534f78e9d60be5 /net/core/dev.c
parentd25843bd76aa793e4076a7f3c64974bdaf341db4 (diff)
[PATCH] remove init_{etherdev,netdev} and dev_alloc
These are racy by "design", and all users have been eliminated.
Diffstat (limited to 'net/core/dev.c')
-rw-r--r--net/core/dev.c35
1 files changed, 0 insertions, 35 deletions
diff --git a/net/core/dev.c b/net/core/dev.c
index 94c16c74dc99..94f1d3603fc8 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -810,40 +810,6 @@ int dev_change_name(struct net_device *dev, char *newname)
}
/**
- * dev_alloc - allocate a network device and name
- * @name: name format string
- * @err: error return pointer
- *
- * Passed a format string, eg. "lt%d", it will allocate a network device
- * and space for the name. %NULL is returned if no memory is available.
- * If the allocation succeeds then the name is assigned and the
- * device pointer returned. %NULL is returned if the name allocation
- * failed. The cause of an error is returned as a negative errno code
- * in the variable @err points to.
- *
- * This call is deprecated in favor of alloc_netdev because
- * the caller must hold the @dev_base or RTNL locks when doing this in
- * order to avoid duplicate name allocations.
- */
-
-struct net_device *__dev_alloc(const char *name, int *err)
-{
- struct net_device *dev = kmalloc(sizeof(*dev), GFP_KERNEL);
-
- if (!dev)
- *err = -ENOBUFS;
- else {
- memset(dev, 0, sizeof(*dev));
- *err = dev_alloc_name(dev, name);
- if (*err < 0) {
- kfree(dev);
- dev = NULL;
- }
- }
- return dev;
-}
-
-/**
* netdev_state_change - device changes state
* @dev: device to cause notification
*
@@ -3232,7 +3198,6 @@ EXPORT_SYMBOL(__dev_remove_pack);
EXPORT_SYMBOL(__skb_linearize);
EXPORT_SYMBOL(call_netdevice_notifiers);
EXPORT_SYMBOL(dev_add_pack);
-EXPORT_SYMBOL(__dev_alloc);
EXPORT_SYMBOL(dev_alloc_name);
EXPORT_SYMBOL(dev_close);
EXPORT_SYMBOL(dev_get_by_flags);