Commit d18c3db5 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman
Browse files

[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: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 4002307d
Loading
Loading
Loading
Loading
+1 −3
Original line number Original line Diff line number Diff line
@@ -364,9 +364,7 @@ static struct pci_driver mptfc_driver = {
	.id_table	= mptfc_pci_table,
	.id_table	= mptfc_pci_table,
	.probe		= mptfc_probe,
	.probe		= mptfc_probe,
	.remove		= __devexit_p(mptscsih_remove),
	.remove		= __devexit_p(mptscsih_remove),
	.driver         = {
	.shutdown	= mptscsih_shutdown,
	.shutdown	= mptscsih_shutdown,
        },
#ifdef CONFIG_PM
#ifdef CONFIG_PM
	.suspend	= mptscsih_suspend,
	.suspend	= mptscsih_suspend,
	.resume		= mptscsih_resume,
	.resume		= mptscsih_resume,
+5 −5
Original line number Original line Diff line number Diff line
@@ -170,7 +170,7 @@ static void mptscsih_fillbuf(char *buffer, int size, int index, int width);
#endif
#endif


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


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


	sz1=0;
	sz1=0;


@@ -1026,9 +1026,9 @@ mptscsih_remove(struct pci_dev *pdev)
 *
 *
 */
 */
void
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;
	struct Scsi_Host 	*host = ioc->sh;
	MPT_SCSI_HOST		*hd;
	MPT_SCSI_HOST		*hd;


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


+1 −1
Original line number Original line Diff line number Diff line
@@ -82,7 +82,7 @@
#endif
#endif


extern void mptscsih_remove(struct pci_dev *);
extern void mptscsih_remove(struct pci_dev *);
extern void mptscsih_shutdown(struct device *);
extern void mptscsih_shutdown(struct pci_dev *);
#ifdef CONFIG_PM
#ifdef CONFIG_PM
extern int mptscsih_suspend(struct pci_dev *pdev, u32 state);
extern int mptscsih_suspend(struct pci_dev *pdev, u32 state);
extern int mptscsih_resume(struct pci_dev *pdev);
extern int mptscsih_resume(struct pci_dev *pdev);
+1 −3
Original line number Original line Diff line number Diff line
@@ -419,9 +419,7 @@ static struct pci_driver mptspi_driver = {
	.id_table	= mptspi_pci_table,
	.id_table	= mptspi_pci_table,
	.probe		= mptspi_probe,
	.probe		= mptspi_probe,
	.remove		= __devexit_p(mptscsih_remove),
	.remove		= __devexit_p(mptscsih_remove),
	.driver         = {
	.shutdown	= mptscsih_shutdown,
	.shutdown	= mptscsih_shutdown,
        },
#ifdef CONFIG_PM
#ifdef CONFIG_PM
	.suspend	= mptscsih_suspend,
	.suspend	= mptscsih_suspend,
	.resume		= mptscsih_resume,
	.resume		= mptscsih_resume,
+2 −7
Original line number Original line Diff line number Diff line
@@ -2440,9 +2440,8 @@ static int e100_resume(struct pci_dev *pdev)
#endif
#endif




static void e100_shutdown(struct device *dev)
static void e100_shutdown(struct pci_dev *pdev)
{
{
	struct pci_dev *pdev = container_of(dev, struct pci_dev, dev);
	struct net_device *netdev = pci_get_drvdata(pdev);
	struct net_device *netdev = pci_get_drvdata(pdev);
	struct nic *nic = netdev_priv(netdev);
	struct nic *nic = netdev_priv(netdev);


@@ -2463,11 +2462,7 @@ static struct pci_driver e100_driver = {
	.suspend =      e100_suspend,
	.suspend =      e100_suspend,
	.resume =       e100_resume,
	.resume =       e100_resume,
#endif
#endif

	.driver = {
	.shutdown =	e100_shutdown,
	.shutdown =	e100_shutdown,
	}

};
};


static int __init e100_init_module(void)
static int __init e100_init_module(void)
Loading