aboutsummaryrefslogtreecommitdiff
path: root/drivers/pci/pci.c
diff options
context:
space:
mode:
authorGravatar Mika Westerberg <mika.westerberg@linux.intel.com> 2020-11-25 12:07:33 +0300
committerGravatar Bjorn Helgaas <bhelgaas@google.com> 2020-12-04 16:49:45 -0600
commit99efde6c9bb7b42eac0459876bf964fe08e5cef9 (patch)
treec9d9cd30dcc4a92a08025abb2248800b44732509 /drivers/pci/pci.c
parentPCI: Add sysfs attribute for device power state (diff)
downloadlinux-99efde6c9bb7b42eac0459876bf964fe08e5cef9.tar.gz
linux-99efde6c9bb7b42eac0459876bf964fe08e5cef9.tar.bz2
linux-99efde6c9bb7b42eac0459876bf964fe08e5cef9.zip
PCI/PM: Rename pci_wakeup_bus() to pci_resume_bus()
A "wakeup" is a signal from a device telling the system that the device or the whole system should be awakened and made active. PCI devices are made active by "resuming" them. pci_wakeup_bus() is not involved with the wakeup signal; it *resumes* devices on a bus (possibly in response to a wakeup signal, but that's at a higher level). Rename pci_wakeup_bus() to pci_resume_bus() to better reflect what it does. No functional change intended. [bhelgaas: commit log, reorder before removal of pci_wakeup_event()] Link: https://lore.kernel.org/r/20201125090733.77782-2-mika.westerberg@linux.intel.com Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Reviewed-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/pci/pci.c')
-rw-r--r--drivers/pci/pci.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
index e578d34095e9..664aada79de2 100644
--- a/drivers/pci/pci.c
+++ b/drivers/pci/pci.c
@@ -1174,12 +1174,7 @@ int pci_platform_power_transition(struct pci_dev *dev, pci_power_t state)
}
EXPORT_SYMBOL_GPL(pci_platform_power_transition);
-/**
- * pci_wakeup - Wake up a PCI device
- * @pci_dev: Device to handle.
- * @ign: ignored parameter
- */
-static int pci_wakeup(struct pci_dev *pci_dev, void *ign)
+static int pci_resume_one(struct pci_dev *pci_dev, void *ign)
{
pci_wakeup_event(pci_dev);
pm_request_resume(&pci_dev->dev);
@@ -1187,13 +1182,13 @@ static int pci_wakeup(struct pci_dev *pci_dev, void *ign)
}
/**
- * pci_wakeup_bus - Walk given bus and wake up devices on it
+ * pci_resume_bus - Walk given bus and runtime resume devices on it
* @bus: Top bus of the subtree to walk.
*/
-void pci_wakeup_bus(struct pci_bus *bus)
+void pci_resume_bus(struct pci_bus *bus)
{
if (bus)
- pci_walk_bus(bus, pci_wakeup, NULL);
+ pci_walk_bus(bus, pci_resume_one, NULL);
}
static int pci_dev_wait(struct pci_dev *dev, char *reset_type, int timeout)
@@ -1256,7 +1251,7 @@ int pci_power_up(struct pci_dev *dev)
* may be powered on into D0uninitialized state, resume them to
* give them a chance to suspend again
*/
- pci_wakeup_bus(dev->subordinate);
+ pci_resume_bus(dev->subordinate);
}
return pci_raw_set_power_state(dev, PCI_D0);