diff options
author | Yoann Padioleau <padator@wanadoo.fr> | 2007-08-03 19:37:16 +0200 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-10-11 01:49:37 +0200 |
commit | 6dbc9c89fb242873bd3e83890e59da3d6e462025 (patch) | |
tree | 9e70567b27c3245b3bcd641cb63a29f8f648719a /drivers/net/wireless/strip.c | |
parent | [PATCH] drivers/net/wireless/prism54/oid_mgt.c: kmalloc + memset conversion t... (diff) | |
download | linux-6dbc9c89fb242873bd3e83890e59da3d6e462025.tar.xz linux-6dbc9c89fb242873bd3e83890e59da3d6e462025.zip |
[PATCH] dev->priv to netdev_priv(dev), for drivers/net/wireless
Replacing accesses to dev->priv to netdev_priv(dev). The replacment
is safe when netdev_priv is used to access a private structure that is
right next to the net_device structure in memory. Cf
http://groups.google.com/group/comp.os.linux.development.system/browse_thread/thread/de19321bcd94dbb8/0d74a4adcd6177bd
This is the case when the net_device structure was allocated with
a call to alloc_netdev or one of its derivative.
Signed-off-by: Yoann Padioleau <padator@wanadoo.fr>
Cc: mcgrof@gmail.com
Cc: linux-wireless@vger.kernel.org
Cc: akpm@linux-foundation.org
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/strip.c')
-rw-r--r-- | drivers/net/wireless/strip.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/wireless/strip.c b/drivers/net/wireless/strip.c index 904e548e6795..c49d5a1f94a2 100644 --- a/drivers/net/wireless/strip.c +++ b/drivers/net/wireless/strip.c @@ -2572,7 +2572,7 @@ static struct strip *strip_alloc(void) return NULL; /* If no more memory, return */ - strip_info = dev->priv; + strip_info = netdev_priv(dev); strip_info->dev = dev; strip_info->magic = STRIP_MAGIC; |