Skip to contentSkip to conversation

Fix suspend/resume on via-velocity

PATCH Applied [email protected] 1 participant 1 message Mar 15, 2005

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 11/13 Fix suspend/resume on via-velocity

From: Pavel Machek <[email protected]>

This fixes suspend-resume on via-velocity. It was confused w.r.t. pointers... Now uses netdev_priv(). [Well, someone should run sed over that driver, there are many more dev->priv].

---

 25-akpm/drivers/net/via-velocity.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
drivers/net/via-velocity.c renamed from drivers/net/via-velocity.c~fix-suspend-resume-on-via-velocity +4 -2
diff -puN drivers/net/via-velocity.c~fix-suspend-resume-on-via-velocity drivers/net/via-velocity.c
@@ -3212,7 +3212,8 @@ static int velocity_set_wol(struct veloc
 
 static int velocity_suspend(struct pci_dev *pdev, pm_message_t state)
 {
-	struct velocity_info *vptr = pci_get_drvdata(pdev);
+	struct net_device *dev = pci_get_drvdata(pdev);
+	struct velocity_info *vptr = netdev_priv(dev);
 	unsigned long flags;
 
 	if(!netif_running(vptr->dev))
@@ -3245,7 +3246,8 @@ static int velocity_suspend(struct pci_d
 
 static int velocity_resume(struct pci_dev *pdev)
 {
-	struct velocity_info *vptr = pci_get_drvdata(pdev);
+	struct net_device *dev = pci_get_drvdata(pdev);
+	struct velocity_info *vptr = netdev_priv(dev);
 	unsigned long flags;
 	int i;
 

_