diff options
author | Yoann Padioleau <padator@wanadoo.fr> | 2007-08-03 13:37:16 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-10-10 19:49:37 -0400 |
commit | 6dbc9c89fb242873bd3e83890e59da3d6e462025 (patch) | |
tree | 9e70567b27c3245b3bcd641cb63a29f8f648719a /drivers/net/wireless/orinoco_tmd.c | |
parent | 8951554dba0c7962ae72faece66e8f5085a777d6 (diff) |
[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/orinoco_tmd.c')
-rw-r--r-- | drivers/net/wireless/orinoco_tmd.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/wireless/orinoco_tmd.c b/drivers/net/wireless/orinoco_tmd.c index 7c7b960c91df..b9c54d8fceb9 100644 --- a/drivers/net/wireless/orinoco_tmd.c +++ b/drivers/net/wireless/orinoco_tmd.c | |||
@@ -190,7 +190,7 @@ static int orinoco_tmd_init_one(struct pci_dev *pdev, | |||
190 | static void __devexit orinoco_tmd_remove_one(struct pci_dev *pdev) | 190 | static void __devexit orinoco_tmd_remove_one(struct pci_dev *pdev) |
191 | { | 191 | { |
192 | struct net_device *dev = pci_get_drvdata(pdev); | 192 | struct net_device *dev = pci_get_drvdata(pdev); |
193 | struct orinoco_private *priv = dev->priv; | 193 | struct orinoco_private *priv = netdev_priv(dev); |
194 | struct orinoco_pci_card *card = priv->card; | 194 | struct orinoco_pci_card *card = priv->card; |
195 | 195 | ||
196 | unregister_netdev(dev); | 196 | unregister_netdev(dev); |