summaryrefslogtreecommitdiffstats
path: root/drivers/pci
diff options
context:
space:
mode:
authorHenrik Kretzschmar <henne@nachtwindheim.de>2006-07-06 18:05:51 +0400
committerGreg Kroah-Hartman <gregkh@suse.de>2006-08-03 13:20:05 -0700
commit60854838596906ebae7f32e4de921e150e669b60 (patch)
treec91eb1672fc7d19dea6ab7379b9e555350158e95 /drivers/pci
parentfd60ae404f104f12369e654af9cf03b1f1047661 (diff)
downloadop-kernel-dev-60854838596906ebae7f32e4de921e150e669b60.zip
op-kernel-dev-60854838596906ebae7f32e4de921e150e669b60.tar.gz
pcie: fix warnings when CONFIG_PM=n
Signed-off-by: Henrik Kretzschmar <henne@nachtwindheim.de> Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/pci')
-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 50bfc1b..d0a3797 100644
--- a/drivers/pci/pcie/portdrv_pci.c
+++ b/drivers/pci/pcie/portdrv_pci.c
@@ -30,23 +30,6 @@ MODULE_LICENSE("GPL");
/* global data */
static const char device_name[] = "pcieport-driver";
-static int pcie_portdrv_save_config(struct pci_dev *dev)
-{
- return pci_save_state(dev);
-}
-
-static int pcie_portdrv_restore_config(struct pci_dev *dev)
-{
- int retval;
-
- pci_restore_state(dev);
- retval = pci_enable_device(dev);
- if (retval)
- return retval;
- pci_set_master(dev);
- return 0;
-}
-
/*
* pcie_portdrv_probe - Probe PCI-Express port devices
* @dev: PCI-Express port device being probed
@@ -86,6 +69,23 @@ static void pcie_portdrv_remove (struct pci_dev *dev)
}
#ifdef CONFIG_PM
+static int pcie_portdrv_save_config(struct pci_dev *dev)
+{
+ return pci_save_state(dev);
+}
+
+static int pcie_portdrv_restore_config(struct pci_dev *dev)
+{
+ int retval;
+
+ pci_restore_state(dev);
+ retval = pci_enable_device(dev);
+ if (retval)
+ return retval;
+ pci_set_master(dev);
+ return 0;
+}
+
static int pcie_portdrv_suspend (struct pci_dev *dev, pm_message_t state)
{
int ret = pcie_port_device_suspend(dev, state);
OpenPOWER on IntegriCloud