aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@suse.de>2005-06-23 20:35:56 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2005-06-28 00:52:47 -0400
commitd18c3db58bc544fce6662ca7edba616ca9788a70 (patch)
treedd4c2d2c0bef6d47a32452112a9396a3137d8c10 /drivers/net
parent4002307d2b563a6ab317ca4d7eb1d201a6673d37 (diff)
[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')
-rw-r--r--drivers/net/e100.c9
-rw-r--r--drivers/net/via-rhine.c11
2 files changed, 6 insertions, 14 deletions
diff --git a/drivers/net/e100.c b/drivers/net/e100.c
index cfaa6b2bf345..be973a1c3c53 100644
--- a/drivers/net/e100.c
+++ b/drivers/net/e100.c
@@ -2440,9 +2440,8 @@ static int e100_resume(struct pci_dev *pdev)
2440#endif 2440#endif
2441 2441
2442 2442
2443static void e100_shutdown(struct device *dev) 2443static void e100_shutdown(struct pci_dev *pdev)
2444{ 2444{
2445 struct pci_dev *pdev = container_of(dev, struct pci_dev, dev);
2446 struct net_device *netdev = pci_get_drvdata(pdev); 2445 struct net_device *netdev = pci_get_drvdata(pdev);
2447 struct nic *nic = netdev_priv(netdev); 2446 struct nic *nic = netdev_priv(netdev);
2448 2447
@@ -2463,11 +2462,7 @@ static struct pci_driver e100_driver = {
2463 .suspend = e100_suspend, 2462 .suspend = e100_suspend,
2464 .resume = e100_resume, 2463 .resume = e100_resume,
2465#endif 2464#endif
2466 2465 .shutdown = e100_shutdown,
2467 .driver = {
2468 .shutdown = e100_shutdown,
2469 }
2470
2471}; 2466};
2472 2467
2473static int __init e100_init_module(void) 2468static int __init e100_init_module(void)
diff --git a/drivers/net/via-rhine.c b/drivers/net/via-rhine.c
index 6200cfc4244e..16212e69a49e 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);
507static int netdev_ioctl(struct net_device *dev, struct ifreq *rq, int cmd); 507static int netdev_ioctl(struct net_device *dev, struct ifreq *rq, int cmd);
508static struct ethtool_ops netdev_ethtool_ops; 508static struct ethtool_ops netdev_ethtool_ops;
509static int rhine_close(struct net_device *dev); 509static int rhine_close(struct net_device *dev);
510static void rhine_shutdown (struct device *gdev); 510static void rhine_shutdown (struct pci_dev *pdev);
511 511
512#define RHINE_WAIT_FOR(condition) do { \ 512#define RHINE_WAIT_FOR(condition) do { \
513 int i=1024; \ 513 int i=1024; \
@@ -1895,9 +1895,8 @@ static void __devexit rhine_remove_one(struct pci_dev *pdev)
1895 pci_set_drvdata(pdev, NULL); 1895 pci_set_drvdata(pdev, NULL);
1896} 1896}
1897 1897
1898static void rhine_shutdown (struct device *gendev) 1898static void rhine_shutdown (struct pci_dev *pdev)
1899{ 1899{
1900 struct pci_dev *pdev = to_pci_dev(gendev);
1901 struct net_device *dev = pci_get_drvdata(pdev); 1900 struct net_device *dev = pci_get_drvdata(pdev);
1902 struct rhine_private *rp = netdev_priv(dev); 1901 struct rhine_private *rp = netdev_priv(dev);
1903 void __iomem *ioaddr = rp->base; 1902 void __iomem *ioaddr = rp->base;
@@ -1956,7 +1955,7 @@ static int rhine_suspend(struct pci_dev *pdev, pm_message_t state)
1956 pci_save_state(pdev); 1955 pci_save_state(pdev);
1957 1956
1958 spin_lock_irqsave(&rp->lock, flags); 1957 spin_lock_irqsave(&rp->lock, flags);
1959 rhine_shutdown(&pdev->dev); 1958 rhine_shutdown(pdev);
1960 spin_unlock_irqrestore(&rp->lock, flags); 1959 spin_unlock_irqrestore(&rp->lock, flags);
1961 1960
1962 free_irq(dev->irq, dev); 1961 free_irq(dev->irq, dev);
@@ -2010,9 +2009,7 @@ static struct pci_driver rhine_driver = {
2010 .suspend = rhine_suspend, 2009 .suspend = rhine_suspend,
2011 .resume = rhine_resume, 2010 .resume = rhine_resume,
2012#endif /* CONFIG_PM */ 2011#endif /* CONFIG_PM */
2013 .driver = { 2012 .shutdown = rhine_shutdown,
2014 .shutdown = rhine_shutdown,
2015 }
2016}; 2013};
2017 2014
2018 2015