mirror of
https://github.com/adulau/aha.git
synced 2025-01-03 22:53:18 +00:00
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>
This commit is contained in:
parent
fd60ae404f
commit
6085483859
1 changed files with 17 additions and 17 deletions
|
@ -30,23 +30,6 @@ MODULE_LICENSE("GPL");
|
||||||
/* global data */
|
/* global data */
|
||||||
static const char device_name[] = "pcieport-driver";
|
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
|
* pcie_portdrv_probe - Probe PCI-Express port devices
|
||||||
* @dev: PCI-Express port device being probed
|
* @dev: PCI-Express port device being probed
|
||||||
|
@ -86,6 +69,23 @@ static void pcie_portdrv_remove (struct pci_dev *dev)
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_PM
|
#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)
|
static int pcie_portdrv_suspend (struct pci_dev *dev, pm_message_t state)
|
||||||
{
|
{
|
||||||
int ret = pcie_port_device_suspend(dev, state);
|
int ret = pcie_port_device_suspend(dev, state);
|
||||||
|
|
Loading…
Reference in a new issue