ixgbevf: use pci drvdata correctly in ixgbevf_suspend()
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>
Thu, 16 Jan 2014 10:30:07 +0000 (02:30 -0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 16 Jan 2014 23:34:24 +0000 (15:34 -0800)
We had set the pci driver-specific data in ixgbevf_probe() as a type of
struct net_device, so we should use it as netdev in ixgbevf_suspend().

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
Signed-off-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c

index a5d3167..74af295 100644 (file)
@@ -3222,8 +3222,8 @@ static int ixgbevf_suspend(struct pci_dev *pdev, pm_message_t state)
 #ifdef CONFIG_PM
 static int ixgbevf_resume(struct pci_dev *pdev)
 {
-       struct ixgbevf_adapter *adapter = pci_get_drvdata(pdev);
-       struct net_device *netdev = adapter->netdev;
+       struct net_device *netdev = pci_get_drvdata(pdev);
+       struct ixgbevf_adapter *adapter = netdev_priv(netdev);
        u32 err;
 
        pci_set_power_state(pdev, PCI_D0);