Commit 3041a069 authored by Stephen Hemminger's avatar Stephen Hemminger Committed by David S. Miller

[NET]: dev.c comment fixes

Noticed that dev_alloc_name() comment was incorrect, and more spellung
errors.
Signed-off-by: default avatarStephen Hemminger <shemminger@osdl.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 4d0c5911
...@@ -127,7 +127,7 @@ ...@@ -127,7 +127,7 @@
* sure which should go first, but I bet it won't make much * sure which should go first, but I bet it won't make much
* difference if we are running VLANs. The good news is that * difference if we are running VLANs. The good news is that
* this protocol won't be in the list unless compiled in, so * this protocol won't be in the list unless compiled in, so
* the average user (w/out VLANs) will not be adversly affected. * the average user (w/out VLANs) will not be adversely affected.
* --BLG * --BLG
* *
* 0800 IP * 0800 IP
...@@ -149,7 +149,7 @@ static struct list_head ptype_base[16]; /* 16 way hashed list */ ...@@ -149,7 +149,7 @@ static struct list_head ptype_base[16]; /* 16 way hashed list */
static struct list_head ptype_all; /* Taps */ static struct list_head ptype_all; /* Taps */
/* /*
* The @dev_base list is protected by @dev_base_lock and the rtln * The @dev_base list is protected by @dev_base_lock and the rtnl
* semaphore. * semaphore.
* *
* Pure readers hold dev_base_lock for reading. * Pure readers hold dev_base_lock for reading.
...@@ -641,10 +641,12 @@ int dev_valid_name(const char *name) ...@@ -641,10 +641,12 @@ int dev_valid_name(const char *name)
* @name: name format string * @name: name format string
* *
* Passed a format string - eg "lt%d" it will try and find a suitable * Passed a format string - eg "lt%d" it will try and find a suitable
* id. Not efficient for many devices, not called a lot. The caller * id. It scans list of devices to build up a free map, then chooses
* must hold the dev_base or rtnl lock while allocating the name and * the first empty slot. The caller must hold the dev_base or rtnl lock
* adding the device in order to avoid duplicates. Returns the number * while allocating the name and adding the device in order to avoid
* of the unit assigned or a negative errno code. * duplicates.
* Limited to bits_per_byte * page size devices (ie 32K on most platforms).
* Returns the number of the unit assigned or a negative errno code.
*/ */
int dev_alloc_name(struct net_device *dev, const char *name) int dev_alloc_name(struct net_device *dev, const char *name)
...@@ -744,7 +746,7 @@ int dev_change_name(struct net_device *dev, char *newname) ...@@ -744,7 +746,7 @@ int dev_change_name(struct net_device *dev, char *newname)
} }
/** /**
* netdev_features_change - device changes fatures * netdev_features_change - device changes features
* @dev: device to cause notification * @dev: device to cause notification
* *
* Called to indicate a device has changed features. * Called to indicate a device has changed features.
...@@ -2196,7 +2198,7 @@ int netdev_set_master(struct net_device *slave, struct net_device *master) ...@@ -2196,7 +2198,7 @@ int netdev_set_master(struct net_device *slave, struct net_device *master)
* @dev: device * @dev: device
* @inc: modifier * @inc: modifier
* *
* Add or remove promsicuity from a device. While the count in the device * Add or remove promiscuity from a device. While the count in the device
* remains above zero the interface remains promiscuous. Once it hits zero * remains above zero the interface remains promiscuous. Once it hits zero
* the device reverts back to normal filtering operation. A negative inc * the device reverts back to normal filtering operation. A negative inc
* value is used to drop promiscuity on the device. * value is used to drop promiscuity on the device.
...@@ -3122,7 +3124,7 @@ EXPORT_SYMBOL(alloc_netdev); ...@@ -3122,7 +3124,7 @@ EXPORT_SYMBOL(alloc_netdev);
void free_netdev(struct net_device *dev) void free_netdev(struct net_device *dev)
{ {
#ifdef CONFIG_SYSFS #ifdef CONFIG_SYSFS
/* Compatiablity with error handling in drivers */ /* Compatibility with error handling in drivers */
if (dev->reg_state == NETREG_UNINITIALIZED) { if (dev->reg_state == NETREG_UNINITIALIZED) {
kfree((char *)dev - dev->padded); kfree((char *)dev - dev->padded);
return; return;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment