Re: Fix suspend/resume on via-velocity

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Pavel Machek wrote:
Hi!

This fixes suspend-resume on via-velocity. It was confused
w.r.t. pointers... Please apply,

Signed-off-by: Pavel Machek <pavel@xxxxxxx>
							Pavel

--- clean-mm/drivers/net/via-velocity.c 2005-03-11 11:25:36.000000000 +0100
+++ linux/drivers/net/via-velocity.c 2005-03-11 10:06:05.000000000 +0100
@@ -3212,7 +3212,8 @@
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 = dev->priv;
unsigned long flags;
if(!netif_running(vptr->dev))
@@ -3245,7 +3246,8 @@
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 = dev->priv;

Please use netdev_priv() rather than 'dev->priv', to eliminate a dereference.


	Jeff



-
: send the line "unsubscribe linux-net" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux 802.1Q VLAN]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Git]     [Bugtraq]     [Yosemite News and Information]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux PCI]     [Linux Admin]     [Samba]

  Powered by Linux