aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/netxen/netxen_nic_main.c
diff options
context:
space:
mode:
authorWang Chen <wangchen@cn.fujitsu.com>2008-11-13 02:38:14 -0500
committerDavid S. Miller <davem@davemloft.net>2008-11-13 02:38:14 -0500
commit4cf1653aa90c6320dc8032443b5e322820aa28b1 (patch)
tree7920008d3f953defdcda8c81d39da963290d93ad /drivers/net/netxen/netxen_nic_main.c
parent454d7c9b14e20fd1949e2686e9de4a2926e01476 (diff)
netdevice: safe convert to netdev_priv() #part-2
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/netxen/netxen_nic_main.c')
-rw-r--r--drivers/net/netxen/netxen_nic_main.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/netxen/netxen_nic_main.c b/drivers/net/netxen/netxen_nic_main.c
index 33caca90e80c..25bfb3acf5e4 100644
--- a/drivers/net/netxen/netxen_nic_main.c
+++ b/drivers/net/netxen/netxen_nic_main.c
@@ -541,7 +541,7 @@ netxen_nic_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
541 541
542 SET_NETDEV_DEV(netdev, &pdev->dev); 542 SET_NETDEV_DEV(netdev, &pdev->dev);
543 543
544 adapter = netdev->priv; 544 adapter = netdev_priv(netdev);
545 adapter->netdev = netdev; 545 adapter->netdev = netdev;
546 adapter->pdev = pdev; 546 adapter->pdev = pdev;
547 adapter->ahw.pci_func = pci_func_id; 547 adapter->ahw.pci_func = pci_func_id;
@@ -986,7 +986,7 @@ static void __devexit netxen_nic_remove(struct pci_dev *pdev)
986 */ 986 */
987static int netxen_nic_open(struct net_device *netdev) 987static int netxen_nic_open(struct net_device *netdev)
988{ 988{
989 struct netxen_adapter *adapter = (struct netxen_adapter *)netdev->priv; 989 struct netxen_adapter *adapter = netdev_priv(netdev);
990 int err = 0; 990 int err = 0;
991 int ctx, ring; 991 int ctx, ring;
992 irq_handler_t handler; 992 irq_handler_t handler;