aboutsummaryrefslogtreecommitdiffstats
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
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>
-rw-r--r--drivers/message/fusion/mptfc.c4
-rw-r--r--drivers/message/fusion/mptscsih.c10
-rw-r--r--drivers/message/fusion/mptscsih.h2
-rw-r--r--drivers/message/fusion/mptspi.c4
-rw-r--r--drivers/net/e100.c9
-rw-r--r--drivers/net/via-rhine.c11
-rw-r--r--drivers/scsi/3w-9xxx.c8
-rw-r--r--drivers/scsi/3w-xxxx.c8
-rw-r--r--drivers/scsi/ipr.c10
-rw-r--r--drivers/scsi/megaraid.c8
10 files changed, 27 insertions, 47 deletions
diff --git a/drivers/message/fusion/mptfc.c b/drivers/message/fusion/mptfc.c
index d8d65397e06e..353deb25e397 100644
--- a/drivers/message/fusion/mptfc.c
+++ b/drivers/message/fusion/mptfc.c
@@ -364,9 +364,7 @@ static struct pci_driver mptfc_driver = {
364 .id_table = mptfc_pci_table, 364 .id_table = mptfc_pci_table,
365 .probe = mptfc_probe, 365 .probe = mptfc_probe,
366 .remove = __devexit_p(mptscsih_remove), 366 .remove = __devexit_p(mptscsih_remove),
367 .driver = { 367 .shutdown = mptscsih_shutdown,
368 .shutdown = mptscsih_shutdown,
369 },
370#ifdef CONFIG_PM 368#ifdef CONFIG_PM
371 .suspend = mptscsih_suspend, 369 .suspend = mptscsih_suspend,
372 .resume = mptscsih_resume, 370 .resume = mptscsih_resume,
diff --git a/drivers/message/fusion/mptscsih.c b/drivers/message/fusion/mptscsih.c
index a0078ae5b9b8..4f973a49be4c 100644
--- a/drivers/message/fusion/mptscsih.c
+++ b/drivers/message/fusion/mptscsih.c
@@ -170,7 +170,7 @@ static void mptscsih_fillbuf(char *buffer, int size, int index, int width);
170#endif 170#endif
171 171
172void mptscsih_remove(struct pci_dev *); 172void mptscsih_remove(struct pci_dev *);
173void mptscsih_shutdown(struct device *); 173void mptscsih_shutdown(struct pci_dev *);
174#ifdef CONFIG_PM 174#ifdef CONFIG_PM
175int mptscsih_suspend(struct pci_dev *pdev, pm_message_t state); 175int mptscsih_suspend(struct pci_dev *pdev, pm_message_t state);
176int mptscsih_resume(struct pci_dev *pdev); 176int mptscsih_resume(struct pci_dev *pdev);
@@ -988,7 +988,7 @@ mptscsih_remove(struct pci_dev *pdev)
988#endif 988#endif
989#endif 989#endif
990 990
991 mptscsih_shutdown(&pdev->dev); 991 mptscsih_shutdown(pdev);
992 992
993 sz1=0; 993 sz1=0;
994 994
@@ -1026,9 +1026,9 @@ mptscsih_remove(struct pci_dev *pdev)
1026 * 1026 *
1027 */ 1027 */
1028void 1028void
1029mptscsih_shutdown(struct device * dev) 1029mptscsih_shutdown(struct pci_dev *pdev)
1030{ 1030{
1031 MPT_ADAPTER *ioc = pci_get_drvdata(to_pci_dev(dev)); 1031 MPT_ADAPTER *ioc = pci_get_drvdata(pdev);
1032 struct Scsi_Host *host = ioc->sh; 1032 struct Scsi_Host *host = ioc->sh;
1033 MPT_SCSI_HOST *hd; 1033 MPT_SCSI_HOST *hd;
1034 1034
@@ -1054,7 +1054,7 @@ mptscsih_shutdown(struct device * dev)
1054int 1054int
1055mptscsih_suspend(struct pci_dev *pdev, pm_message_t state) 1055mptscsih_suspend(struct pci_dev *pdev, pm_message_t state)
1056{ 1056{
1057 mptscsih_shutdown(&pdev->dev); 1057 mptscsih_shutdown(pdev);
1058 return mpt_suspend(pdev,state); 1058 return mpt_suspend(pdev,state);
1059} 1059}
1060 1060
diff --git a/drivers/message/fusion/mptscsih.h b/drivers/message/fusion/mptscsih.h
index d73aec33e16a..5ea89bf0df19 100644
--- a/drivers/message/fusion/mptscsih.h
+++ b/drivers/message/fusion/mptscsih.h
@@ -82,7 +82,7 @@
82#endif 82#endif
83 83
84extern void mptscsih_remove(struct pci_dev *); 84extern void mptscsih_remove(struct pci_dev *);
85extern void mptscsih_shutdown(struct device *); 85extern void mptscsih_shutdown(struct pci_dev *);
86#ifdef CONFIG_PM 86#ifdef CONFIG_PM
87extern int mptscsih_suspend(struct pci_dev *pdev, u32 state); 87extern int mptscsih_suspend(struct pci_dev *pdev, u32 state);
88extern int mptscsih_resume(struct pci_dev *pdev); 88extern int mptscsih_resume(struct pci_dev *pdev);
diff --git a/drivers/message/fusion/mptspi.c b/drivers/message/fusion/mptspi.c
index 5f9a61b85b3b..e0c0ee5bc966 100644
--- a/drivers/message/fusion/mptspi.c
+++ b/drivers/message/fusion/mptspi.c
@@ -419,9 +419,7 @@ static struct pci_driver mptspi_driver = {
419 .id_table = mptspi_pci_table, 419 .id_table = mptspi_pci_table,
420 .probe = mptspi_probe, 420 .probe = mptspi_probe,
421 .remove = __devexit_p(mptscsih_remove), 421 .remove = __devexit_p(mptscsih_remove),
422 .driver = { 422 .shutdown = mptscsih_shutdown,
423 .shutdown = mptscsih_shutdown,
424 },
425#ifdef CONFIG_PM 423#ifdef CONFIG_PM
426 .suspend = mptscsih_suspend, 424 .suspend = mptscsih_suspend,
427 .resume = mptscsih_resume, 425 .resume = mptscsih_resume,
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
diff --git a/drivers/scsi/3w-9xxx.c b/drivers/scsi/3w-9xxx.c
index 34dbc37a79d4..bc6e4627c7a1 100644
--- a/drivers/scsi/3w-9xxx.c
+++ b/drivers/scsi/3w-9xxx.c
@@ -1916,9 +1916,9 @@ static void __twa_shutdown(TW_Device_Extension *tw_dev)
1916} /* End __twa_shutdown() */ 1916} /* End __twa_shutdown() */
1917 1917
1918/* Wrapper for __twa_shutdown */ 1918/* Wrapper for __twa_shutdown */
1919static void twa_shutdown(struct device *dev) 1919static void twa_shutdown(struct pci_dev *pdev)
1920{ 1920{
1921 struct Scsi_Host *host = pci_get_drvdata(to_pci_dev(dev)); 1921 struct Scsi_Host *host = pci_get_drvdata(pdev);
1922 TW_Device_Extension *tw_dev = (TW_Device_Extension *)host->hostdata; 1922 TW_Device_Extension *tw_dev = (TW_Device_Extension *)host->hostdata;
1923 1923
1924 __twa_shutdown(tw_dev); 1924 __twa_shutdown(tw_dev);
@@ -2140,9 +2140,7 @@ static struct pci_driver twa_driver = {
2140 .id_table = twa_pci_tbl, 2140 .id_table = twa_pci_tbl,
2141 .probe = twa_probe, 2141 .probe = twa_probe,
2142 .remove = twa_remove, 2142 .remove = twa_remove,
2143 .driver = { 2143 .shutdown = twa_shutdown
2144 .shutdown = twa_shutdown
2145 }
2146}; 2144};
2147 2145
2148/* This function is called on driver initialization */ 2146/* This function is called on driver initialization */
diff --git a/drivers/scsi/3w-xxxx.c b/drivers/scsi/3w-xxxx.c
index b6dc576da430..973c51fb0fe2 100644
--- a/drivers/scsi/3w-xxxx.c
+++ b/drivers/scsi/3w-xxxx.c
@@ -2264,9 +2264,9 @@ static void __tw_shutdown(TW_Device_Extension *tw_dev)
2264} /* End __tw_shutdown() */ 2264} /* End __tw_shutdown() */
2265 2265
2266/* Wrapper for __tw_shutdown */ 2266/* Wrapper for __tw_shutdown */
2267static void tw_shutdown(struct device *dev) 2267static void tw_shutdown(struct pci_dev *pdev)
2268{ 2268{
2269 struct Scsi_Host *host = pci_get_drvdata(to_pci_dev(dev)); 2269 struct Scsi_Host *host = pci_get_drvdata(pdev);
2270 TW_Device_Extension *tw_dev = (TW_Device_Extension *)host->hostdata; 2270 TW_Device_Extension *tw_dev = (TW_Device_Extension *)host->hostdata;
2271 2271
2272 __tw_shutdown(tw_dev); 2272 __tw_shutdown(tw_dev);
@@ -2451,9 +2451,7 @@ static struct pci_driver tw_driver = {
2451 .id_table = tw_pci_tbl, 2451 .id_table = tw_pci_tbl,
2452 .probe = tw_probe, 2452 .probe = tw_probe,
2453 .remove = tw_remove, 2453 .remove = tw_remove,
2454 .driver = { 2454 .shutdown = tw_shutdown,
2455 .shutdown = tw_shutdown
2456 }
2457}; 2455};
2458 2456
2459/* This function is called on driver initialization */ 2457/* This function is called on driver initialization */
diff --git a/drivers/scsi/ipr.c b/drivers/scsi/ipr.c
index 80d022625c82..babd48363402 100644
--- a/drivers/scsi/ipr.c
+++ b/drivers/scsi/ipr.c
@@ -6012,7 +6012,7 @@ static int __devinit ipr_probe(struct pci_dev *pdev,
6012 6012
6013/** 6013/**
6014 * ipr_shutdown - Shutdown handler. 6014 * ipr_shutdown - Shutdown handler.
6015 * @dev: device struct 6015 * @pdev: pci device struct
6016 * 6016 *
6017 * This function is invoked upon system shutdown/reboot. It will issue 6017 * This function is invoked upon system shutdown/reboot. It will issue
6018 * an adapter shutdown to the adapter to flush the write cache. 6018 * an adapter shutdown to the adapter to flush the write cache.
@@ -6020,9 +6020,9 @@ static int __devinit ipr_probe(struct pci_dev *pdev,
6020 * Return value: 6020 * Return value:
6021 * none 6021 * none
6022 **/ 6022 **/
6023static void ipr_shutdown(struct device *dev) 6023static void ipr_shutdown(struct pci_dev *pdev)
6024{ 6024{
6025 struct ipr_ioa_cfg *ioa_cfg = pci_get_drvdata(to_pci_dev(dev)); 6025 struct ipr_ioa_cfg *ioa_cfg = pci_get_drvdata(pdev);
6026 unsigned long lock_flags = 0; 6026 unsigned long lock_flags = 0;
6027 6027
6028 spin_lock_irqsave(ioa_cfg->host->host_lock, lock_flags); 6028 spin_lock_irqsave(ioa_cfg->host->host_lock, lock_flags);
@@ -6068,9 +6068,7 @@ static struct pci_driver ipr_driver = {
6068 .id_table = ipr_pci_table, 6068 .id_table = ipr_pci_table,
6069 .probe = ipr_probe, 6069 .probe = ipr_probe,
6070 .remove = ipr_remove, 6070 .remove = ipr_remove,
6071 .driver = { 6071 .shutdown = ipr_shutdown,
6072 .shutdown = ipr_shutdown,
6073 },
6074}; 6072};
6075 6073
6076/** 6074/**
diff --git a/drivers/scsi/megaraid.c b/drivers/scsi/megaraid.c
index ec81532eb845..a70cdf31311c 100644
--- a/drivers/scsi/megaraid.c
+++ b/drivers/scsi/megaraid.c
@@ -5036,9 +5036,9 @@ megaraid_remove_one(struct pci_dev *pdev)
5036} 5036}
5037 5037
5038static void 5038static void
5039megaraid_shutdown(struct device *dev) 5039megaraid_shutdown(struct pci_dev *pdev)
5040{ 5040{
5041 struct Scsi_Host *host = pci_get_drvdata(to_pci_dev(dev)); 5041 struct Scsi_Host *host = pci_get_drvdata(pdev);
5042 adapter_t *adapter = (adapter_t *)host->hostdata; 5042 adapter_t *adapter = (adapter_t *)host->hostdata;
5043 5043
5044 __megaraid_shutdown(adapter); 5044 __megaraid_shutdown(adapter);
@@ -5070,9 +5070,7 @@ static struct pci_driver megaraid_pci_driver = {
5070 .id_table = megaraid_pci_tbl, 5070 .id_table = megaraid_pci_tbl,
5071 .probe = megaraid_probe_one, 5071 .probe = megaraid_probe_one,
5072 .remove = __devexit_p(megaraid_remove_one), 5072 .remove = __devexit_p(megaraid_remove_one),
5073 .driver = { 5073 .shutdown = megaraid_shutdown,
5074 .shutdown = megaraid_shutdown,
5075 },
5076}; 5074};
5077 5075
5078static int __init megaraid_init(void) 5076static int __init megaraid_init(void)