aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/atl1e
diff options
context:
space:
mode:
authorWang Chen <wangchen@cn.fujitsu.com>2008-11-13 02:37:49 -0500
committerDavid S. Miller <davem@davemloft.net>2008-11-13 02:37:49 -0500
commit454d7c9b14e20fd1949e2686e9de4a2926e01476 (patch)
treefae8bd1bfb5fd496977a0639ad71c54a2ee278ae /drivers/net/atl1e
parent7a12122c7a00347da9669cfcde82954c9e3d6f5e (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/atl1e')
-rw-r--r--drivers/net/atl1e/atl1e_main.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/atl1e/atl1e_main.c b/drivers/net/atl1e/atl1e_main.c
index 0f8c7525620c..c8b7cea4b14e 100644
--- a/drivers/net/atl1e/atl1e_main.c
+++ b/drivers/net/atl1e/atl1e_main.c
@@ -2487,7 +2487,7 @@ static pci_ers_result_t
2487atl1e_io_error_detected(struct pci_dev *pdev, pci_channel_state_t state) 2487atl1e_io_error_detected(struct pci_dev *pdev, pci_channel_state_t state)
2488{ 2488{
2489 struct net_device *netdev = pci_get_drvdata(pdev); 2489 struct net_device *netdev = pci_get_drvdata(pdev);
2490 struct atl1e_adapter *adapter = netdev->priv; 2490 struct atl1e_adapter *adapter = netdev_priv(netdev);
2491 2491
2492 netif_device_detach(netdev); 2492 netif_device_detach(netdev);
2493 2493
@@ -2510,7 +2510,7 @@ atl1e_io_error_detected(struct pci_dev *pdev, pci_channel_state_t state)
2510static pci_ers_result_t atl1e_io_slot_reset(struct pci_dev *pdev) 2510static pci_ers_result_t atl1e_io_slot_reset(struct pci_dev *pdev)
2511{ 2511{
2512 struct net_device *netdev = pci_get_drvdata(pdev); 2512 struct net_device *netdev = pci_get_drvdata(pdev);
2513 struct atl1e_adapter *adapter = netdev->priv; 2513 struct atl1e_adapter *adapter = netdev_priv(netdev);
2514 2514
2515 if (pci_enable_device(pdev)) { 2515 if (pci_enable_device(pdev)) {
2516 dev_err(&pdev->dev, 2516 dev_err(&pdev->dev,
@@ -2538,7 +2538,7 @@ static pci_ers_result_t atl1e_io_slot_reset(struct pci_dev *pdev)
2538static void atl1e_io_resume(struct pci_dev *pdev) 2538static void atl1e_io_resume(struct pci_dev *pdev)
2539{ 2539{
2540 struct net_device *netdev = pci_get_drvdata(pdev); 2540 struct net_device *netdev = pci_get_drvdata(pdev);
2541 struct atl1e_adapter *adapter = netdev->priv; 2541 struct atl1e_adapter *adapter = netdev_priv(netdev);
2542 2542
2543 if (netif_running(netdev)) { 2543 if (netif_running(netdev)) {
2544 if (atl1e_up(adapter)) { 2544 if (atl1e_up(adapter)) {