Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Mika Westerberg and committed by
Bjorn Helgaas
99efde6c 80a129af

+7 -12
+1 -1
drivers/gpu/vga/vga_switcheroo.c
··· 1039 1039 mutex_lock(&vgasr_mutex); 1040 1040 vga_switcheroo_power_switch(pdev, VGA_SWITCHEROO_ON); 1041 1041 mutex_unlock(&vgasr_mutex); 1042 - pci_wakeup_bus(pdev->bus); 1042 + pci_resume_bus(pdev->bus); 1043 1043 ret = dev->bus->pm->runtime_resume(dev); 1044 1044 if (ret) 1045 1045 return ret;
+5 -10
drivers/pci/pci.c
··· 1174 1174 } 1175 1175 EXPORT_SYMBOL_GPL(pci_platform_power_transition); 1176 1176 1177 - /** 1178 - * pci_wakeup - Wake up a PCI device 1179 - * @pci_dev: Device to handle. 1180 - * @ign: ignored parameter 1181 - */ 1182 - static int pci_wakeup(struct pci_dev *pci_dev, void *ign) 1177 + static int pci_resume_one(struct pci_dev *pci_dev, void *ign) 1183 1178 { 1184 1179 pci_wakeup_event(pci_dev); 1185 1180 pm_request_resume(&pci_dev->dev); ··· 1182 1187 } 1183 1188 1184 1189 /** 1185 - * pci_wakeup_bus - Walk given bus and wake up devices on it 1190 + * pci_resume_bus - Walk given bus and runtime resume devices on it 1186 1191 * @bus: Top bus of the subtree to walk. 1187 1192 */ 1188 - void pci_wakeup_bus(struct pci_bus *bus) 1193 + void pci_resume_bus(struct pci_bus *bus) 1189 1194 { 1190 1195 if (bus) 1191 - pci_walk_bus(bus, pci_wakeup, NULL); 1196 + pci_walk_bus(bus, pci_resume_one, NULL); 1192 1197 } 1193 1198 1194 1199 static int pci_dev_wait(struct pci_dev *dev, char *reset_type, int timeout) ··· 1251 1256 * may be powered on into D0uninitialized state, resume them to 1252 1257 * give them a chance to suspend again 1253 1258 */ 1254 - pci_wakeup_bus(dev->subordinate); 1259 + pci_resume_bus(dev->subordinate); 1255 1260 } 1256 1261 1257 1262 return pci_raw_set_power_state(dev, PCI_D0);
+1 -1
include/linux/pci.h
··· 1271 1271 void pci_d3cold_enable(struct pci_dev *dev); 1272 1272 void pci_d3cold_disable(struct pci_dev *dev); 1273 1273 bool pcie_relaxed_ordering_enabled(struct pci_dev *dev); 1274 - void pci_wakeup_bus(struct pci_bus *bus); 1274 + void pci_resume_bus(struct pci_bus *bus); 1275 1275 void pci_bus_set_current_state(struct pci_bus *bus, pci_power_t state); 1276 1276 1277 1277 /* For use by arch with custom probe code */