[<prev] [next>] [day] [month] [year] [list]
Message-ID: <CAPgLHd-DEjDxA-9=O_Yqd-9Nc4Q-Xt1kXXcQj7Kc4ig070KQmw@mail.gmail.com>
Date: Tue, 7 Jan 2014 16:53:01 +0800
From: Wei Yongjun <weiyj.lk@...il.com>
To: jeffrey.t.kirsher@...el.com, jesse.brandeburg@...el.com,
bruce.w.allan@...el.com, carolyn.wyborny@...el.com,
donald.c.skidmore@...el.com, gregory.v.rose@...el.com,
alexander.h.duyck@...el.com, john.ronciak@...el.com,
mitch.a.williams@...el.com
Cc: yongjun_wei@...ndmicro.com.cn, e1000-devel@...ts.sourceforge.net,
netdev@...r.kernel.org
Subject: [PATCH -next] i40evf: use pci drvdata correctly in i40evf_suspend()
From: Wei Yongjun <yongjun_wei@...ndmicro.com.cn>
We had set the pci driver-specific data in i40evf_probe() as
a type of struct net_device, so we should use it as netdev
in i40evf_resume().
Signed-off-by: Wei Yongjun <yongjun_wei@...ndmicro.com.cn>
---
drivers/net/ethernet/intel/i40evf/i40evf_main.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/intel/i40evf/i40evf_main.c b/drivers/net/ethernet/intel/i40evf/i40evf_main.c
index 06bf8253..a495ec4 100644
--- a/drivers/net/ethernet/intel/i40evf/i40evf_main.c
+++ b/drivers/net/ethernet/intel/i40evf/i40evf_main.c
@@ -2216,8 +2216,8 @@ static int i40evf_suspend(struct pci_dev *pdev, pm_message_t state)
**/
static int i40evf_resume(struct pci_dev *pdev)
{
- struct i40evf_adapter *adapter = pci_get_drvdata(pdev);
- struct net_device *netdev = adapter->netdev;
+ struct net_device *netdev = pci_get_drvdata(pdev);
+ struct i40evf_adapter *adapter = netdev_priv(netdev);
u32 err;
pci_set_power_state(pdev, PCI_D0);
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists