netdev
[Top] [All Lists]

[patch 11/13] Fix suspend/resume on via-velocity

To: davem@xxxxxxxxxxxxx
Subject: [patch 11/13] Fix suspend/resume on via-velocity
From: akpm@xxxxxxxx
Date: Tue, 15 Mar 2005 14:22:48 -0800
Cc: jgarzik@xxxxxxxxx, netdev@xxxxxxxxxxx, akpm@xxxxxxxx, pavel@xxxxxx, pavel@xxxxxxx
Sender: netdev-bounce@xxxxxxxxxxx
From: Pavel Machek <pavel@xxxxxx>

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].

Signed-off-by: Pavel Machek <pavel@xxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxx>
---

 25-akpm/drivers/net/via-velocity.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff -puN drivers/net/via-velocity.c~fix-suspend-resume-on-via-velocity 
drivers/net/via-velocity.c
--- 25/drivers/net/via-velocity.c~fix-suspend-resume-on-via-velocity    Tue Mar 
15 14:19:55 2005
+++ 25-akpm/drivers/net/via-velocity.c  Tue Mar 15 14:19:55 2005
@@ -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;
 
_

<Prev in Thread] Current Thread [Next in Thread>
  • [patch 11/13] Fix suspend/resume on via-velocity, akpm <=