diff options
author | Rafael J. Wysocki <rjw@sisk.pl> | 2009-03-16 17:40:18 -0400 |
---|---|---|
committer | Rafael J. Wysocki <rjw@sisk.pl> | 2009-03-30 15:46:55 -0400 |
commit | 0128a89cf75124500b5b69f0c3c7b7c5aa60676f (patch) | |
tree | 96cdc2c1dc62f2a543b11f481811efce59b1f0f7 /drivers/pci/pci.c | |
parent | f00a20ef46b1795c495869163a9a7333f899713a (diff) |
PCI PM: Move pci_restore_standard_config to pci-driver.c
Move pci_restore_standard_config() from pci.c to pci-driver.c and
make it static.
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Acked-by: Ingo Molnar <mingo@elte.hu>
Acked-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Diffstat (limited to 'drivers/pci/pci.c')
-rw-r--r-- | drivers/pci/pci.c | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index 3acb1da296d5..a4ecc2f15126 100644 --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c | |||
@@ -1374,27 +1374,6 @@ void pci_allocate_cap_save_buffers(struct pci_dev *dev) | |||
1374 | } | 1374 | } |
1375 | 1375 | ||
1376 | /** | 1376 | /** |
1377 | * pci_restore_standard_config - restore standard config registers of PCI device | ||
1378 | * @dev: PCI device to handle | ||
1379 | * | ||
1380 | * This function assumes that the device's configuration space is accessible. | ||
1381 | * If the device needs to be powered up, the function will wait for it to | ||
1382 | * change the state. | ||
1383 | */ | ||
1384 | int pci_restore_standard_config(struct pci_dev *dev) | ||
1385 | { | ||
1386 | pci_update_current_state(dev, PCI_UNKNOWN); | ||
1387 | |||
1388 | if (dev->current_state != PCI_D0) { | ||
1389 | int error = pci_set_power_state(dev, PCI_D0); | ||
1390 | if (error) | ||
1391 | return error; | ||
1392 | } | ||
1393 | |||
1394 | return dev->state_saved ? pci_restore_state(dev) : 0; | ||
1395 | } | ||
1396 | |||
1397 | /** | ||
1398 | * pci_enable_ari - enable ARI forwarding if hardware support it | 1377 | * pci_enable_ari - enable ARI forwarding if hardware support it |
1399 | * @dev: the PCI device | 1378 | * @dev: the PCI device |
1400 | */ | 1379 | */ |