aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/pci/pcie/portdrv_pci.c34
1 files changed, 17 insertions, 17 deletions
diff --git a/drivers/pci/pcie/portdrv_pci.c b/drivers/pci/pcie/portdrv_pci.c
index 50bfc1b2f3bf..d0a37976faa6 100644
--- a/drivers/pci/pcie/portdrv_pci.c
+++ b/drivers/pci/pcie/portdrv_pci.c
@@ -30,23 +30,6 @@ MODULE_LICENSE("GPL");
30/* global data */ 30/* global data */
31static const char device_name[] = "pcieport-driver"; 31static const char device_name[] = "pcieport-driver";
32 32
33static int pcie_portdrv_save_config(struct pci_dev *dev)
34{
35 return pci_save_state(dev);
36}
37
38static int pcie_portdrv_restore_config(struct pci_dev *dev)
39{
40 int retval;
41
42 pci_restore_state(dev);
43 retval = pci_enable_device(dev);
44 if (retval)
45 return retval;
46 pci_set_master(dev);
47 return 0;
48}
49
50/* 33/*
51 * pcie_portdrv_probe - Probe PCI-Express port devices 34 * pcie_portdrv_probe - Probe PCI-Express port devices
52 * @dev: PCI-Express port device being probed 35 * @dev: PCI-Express port device being probed
@@ -86,6 +69,23 @@ static void pcie_portdrv_remove (struct pci_dev *dev)
86} 69}
87 70
88#ifdef CONFIG_PM 71#ifdef CONFIG_PM
72static int pcie_portdrv_save_config(struct pci_dev *dev)
73{
74 return pci_save_state(dev);
75}
76
77static int pcie_portdrv_restore_config(struct pci_dev *dev)
78{
79 int retval;
80
81 pci_restore_state(dev);
82 retval = pci_enable_device(dev);
83 if (retval)
84 return retval;
85 pci_set_master(dev);
86 return 0;
87}
88
89static int pcie_portdrv_suspend (struct pci_dev *dev, pm_message_t state) 89static int pcie_portdrv_suspend (struct pci_dev *dev, pm_message_t state)
90{ 90{
91 int ret = pcie_port_device_suspend(dev, state); 91 int ret = pcie_port_device_suspend(dev, state);