[PATCH] PCI: make drivers use the pci shutdown callback instead of the driver core callback.

[PATCH] PCI: make drivers use the pci shutdown callback instead of the driver core callback.

Post by Greg K » Wed, 29 Jun 2005 15:30:12


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 < XXXX@XXXXX.COM >

---
commit d18c3db58bc544fce6662ca7edba616ca9788a70
tree dd4c2d2c0bef6d47a32452112a9396a3137d8c10
parent 4002307d2b563a6ab317ca4d7eb1d201a6673d37
author Greg Kroah-Hartman < XXXX@XXXXX.COM > Thu, 23 Jun 2005 17:35:56 -0700
committer Greg Kroah-Hartman < XXXX@XXXXX.COM > Mon, 27 Jun 2005 21:52:47 -0700

drivers/message/fusion/mptfc.c | 4 +---
drivers/message/fusion/mptscsih.c | 10 +++++-----
drivers/message/fusion/mptscsih.h | 2 +-
drivers/message/fusion/mptspi.c | 4 +---
drivers/net/e100.c | 9 ++-------
drivers/net/via-rhine.c | 11 ++++-------
drivers/scsi/3w-9xxx.c | 8 +++-----
drivers/scsi/3w-xxxx.c | 8 +++-----
drivers/scsi/ipr.c | 10 ++++------
drivers/scsi/megaraid.c | 8 +++-----
10 files changed, 27 insertions(+), 47 deletions(-)

diff --git a/drivers/message/fusion/mptfc.c b/drivers/message/fusion/mptfc.c
--- a/drivers/message/fusion/mptfc.c
+++ b/drivers/message/fusion/mptfc.c
@@ -364,9 +364,7 @@ static struct pci_driver mptfc_driver =
.id_table = mptfc_pci_table,
.probe = mptfc_probe,
.remove = __devexit_p(mptscsih_remove),
- .driver = {
- .shutdown = mptscsih_shutdown,
- },
+ .shutdown = mptscsih_shutdown,
#ifdef CONFIG_PM
.suspend = mptscsih_suspend,
.resume = mptscsih_resume,
diff --git a/drivers/message/fusion/mptscsih.c b/drivers/message/fusion/mptscsih.c
--- a/drivers/message/fusion/mptscsih.c
+++ b/drivers/message/fusion/mptscsih.c
@@ -170,7 +170,7 @@ static void mptscsih_fillbuf(char *buffe
#endif

void mptscsih_remove(struct pci_dev *);
-void mptscsih_shutdown(struct device *);
+void mptscsih_shutdown(struct pci_dev *);
#ifdef CONFIG_PM
int mptscsih_suspend(struct pci_dev *pdev, pm_message_t state);
int mptscsih_resume(struct pci_dev *pdev);
@@ -988,7 +988,7 @@ mptscsih_remove(struct pci_dev *pdev)
#endif
#endif

- mptscsih_shutdown(&pdev->dev);
+ mptscsih_shutdown(pdev);

sz1=0;

@@ -1026,9 +1026,9 @@ mptscsih_remove(struct pci_dev *pdev)
*
*/
void
-mptscsih_shutdown(struct device * dev)
+mptscsih_shutdown(struct pci_dev *pdev)
{
- MPT_ADAPTER *ioc = pci_get_drvdata(to_pci_dev(dev));
+ MPT_ADAPTER *ioc = pci_get_drvdata(pdev);
struct Scsi_Host *host = ioc->sh;
MPT_SCSI_HOST *hd;

@@ -1054,7 +1054,7 @@ mptscsih_shutdown(struct device * dev)
int
mptscsih_suspend(struct pci_dev *pdev, pm_message_t state)
{
- mptscsih_shutdown(&pdev->dev);
+ mptscsih_shutdown(pdev);
return mpt_suspend(pdev,state);
}

diff --git a/drivers/message/fusion/mptscsih.h b/drivers/message/fusion/mptscsih.h
--- a/drivers/message/fusion/mptscsih.h
+++ b/drivers/message/fusion/mptscsih.h
@@ -82,7 +82,7 @@
#endif

extern void mptscsih_remove(struct pci_dev *);
-extern void mptscsih_shutdown(struct device *);
+extern void mptscsih_shutdown(struct pci_dev *);
#ifdef CONFIG_PM
extern int mptscsih_suspend(struct pci_dev *pdev, u32 state);
extern int mptscsih_resume(struct pci_dev *pdev);
diff --git a/drivers/message/fusion/mptspi.c b/drivers/message/fusion/mptspi.c
--- a/driver