diff options
author | Greg Kroah-Hartman <gregkh@suse.de> | 2005-06-23 17:35:56 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2005-06-27 21:52:47 -0700 |
commit | d18c3db58bc544fce6662ca7edba616ca9788a70 (patch) | |
tree | dd4c2d2c0bef6d47a32452112a9396a3137d8c10 /drivers/net/via-rhine.c | |
parent | 4002307d2b563a6ab317ca4d7eb1d201a6673d37 (diff) | |
download | op-kernel-dev-d18c3db58bc544fce6662ca7edba616ca9788a70.zip op-kernel-dev-d18c3db58bc544fce6662ca7edba616ca9788a70.tar.gz |
[PATCH] PCI: make drivers use the pci shutdown callback instead of the driver core callback.
Now we can change the pci core to always set this pointer, as pci drivers
should use it, not the driver core callback.
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/net/via-rhine.c')
-rw-r--r-- | drivers/net/via-rhine.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/drivers/net/via-rhine.c b/drivers/net/via-rhine.c index 6200cfc..16212e6 100644 --- a/drivers/net/via-rhine.c +++ b/drivers/net/via-rhine.c @@ -507,7 +507,7 @@ static struct net_device_stats *rhine_get_stats(struct net_device *dev); static int netdev_ioctl(struct net_device *dev, struct ifreq *rq, int cmd); static struct ethtool_ops netdev_ethtool_ops; static int rhine_close(struct net_device *dev); -static void rhine_shutdown (struct device *gdev); +static void rhine_shutdown (struct pci_dev *pdev); #define RHINE_WAIT_FOR(condition) do { \ int i=1024; \ @@ -1895,9 +1895,8 @@ static void __devexit rhine_remove_one(struct pci_dev *pdev) pci_set_drvdata(pdev, NULL); } -static void rhine_shutdown (struct device *gendev) +static void rhine_shutdown (struct pci_dev *pdev) { - struct pci_dev *pdev = to_pci_dev(gendev); struct net_device *dev = pci_get_drvdata(pdev); struct rhine_private *rp = netdev_priv(dev); void __iomem *ioaddr = rp->base; @@ -1956,7 +1955,7 @@ static int rhine_suspend(struct pci_dev *pdev, pm_message_t state) pci_save_state(pdev); spin_lock_irqsave(&rp->lock, flags); - rhine_shutdown(&pdev->dev); + rhine_shutdown(pdev); spin_unlock_irqrestore(&rp->lock, flags); free_irq(dev->irq, dev); @@ -2010,9 +2009,7 @@ static struct pci_driver rhine_driver = { .suspend = rhine_suspend, .resume = rhine_resume, #endif /* CONFIG_PM */ - .driver = { - .shutdown = rhine_shutdown, - } + .shutdown = rhine_shutdown, }; |