diff options
author | Wang Chen <wangchen@cn.fujitsu.com> | 2008-11-13 02:37:49 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-11-13 02:37:49 -0500 |
commit | 454d7c9b14e20fd1949e2686e9de4a2926e01476 (patch) | |
tree | fae8bd1bfb5fd496977a0639ad71c54a2ee278ae /drivers/net/3c59x.c | |
parent | 7a12122c7a00347da9669cfcde82954c9e3d6f5e (diff) |
netdevice: safe convert to netdev_priv() #part-1
We have some reasons to kill netdev->priv:
1. netdev->priv is equal to netdev_priv().
2. netdev_priv() wraps the calculation of netdev->priv's offset, obviously
netdev_priv() is more flexible than netdev->priv.
But we cann't kill netdev->priv, because so many drivers reference to it
directly.
This patch is a safe convert for netdev->priv to netdev_priv(netdev).
Since all of the netdev->priv is only for read.
But it is too big to be sent in one mail.
I split it to 4 parts and make every part smaller than 100,000 bytes,
which is max size allowed by vger.
Signed-off-by: Wang Chen <wangchen@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/3c59x.c')
-rw-r--r-- | drivers/net/3c59x.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/3c59x.c b/drivers/net/3c59x.c index 3893f505fb5f..665e7fdf27a1 100644 --- a/drivers/net/3c59x.c +++ b/drivers/net/3c59x.c | |||
@@ -803,7 +803,7 @@ static int vortex_suspend(struct pci_dev *pdev, pm_message_t state) | |||
803 | { | 803 | { |
804 | struct net_device *dev = pci_get_drvdata(pdev); | 804 | struct net_device *dev = pci_get_drvdata(pdev); |
805 | 805 | ||
806 | if (dev && dev->priv) { | 806 | if (dev && netdev_priv(dev)) { |
807 | if (netif_running(dev)) { | 807 | if (netif_running(dev)) { |
808 | netif_device_detach(dev); | 808 | netif_device_detach(dev); |
809 | vortex_down(dev, 1); | 809 | vortex_down(dev, 1); |
@@ -3214,7 +3214,7 @@ static void __exit vortex_eisa_cleanup(void) | |||
3214 | #endif | 3214 | #endif |
3215 | 3215 | ||
3216 | if (compaq_net_device) { | 3216 | if (compaq_net_device) { |
3217 | vp = compaq_net_device->priv; | 3217 | vp = netdev_priv(compaq_net_device); |
3218 | ioaddr = ioport_map(compaq_net_device->base_addr, | 3218 | ioaddr = ioport_map(compaq_net_device->base_addr, |
3219 | VORTEX_TOTAL_SIZE); | 3219 | VORTEX_TOTAL_SIZE); |
3220 | 3220 | ||