PCI/PM: Split pci_power_up()
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Thu, 5 May 2022 18:13:00 +0000 (20:13 +0200)
committerBjorn Helgaas <bhelgaas@google.com>
Thu, 5 May 2022 19:19:49 +0000 (14:19 -0500)
commite200904b275c63dae711fca542f5fb20d162eb26
tree764c524133f900d244a19e3b52f85f5a7a84ffaf
parentf0881d38c7eca3351f59d551604aaf74283c2e13
PCI/PM: Split pci_power_up()

One of the two callers of pci_power_up() invokes
pci_update_current_state() and pci_restore_state() right after calling
it, in which case running the part of it happening after the mandatory
transition delays is redundant, so move that part out of it into a new
function called pci_set_full_power_state() that will be invoked from
pci_set_power_state() which is the other caller of pci_power_up().

Link: https://lore.kernel.org/r/1942150.usQuhbGJ8B@kreacher
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
drivers/pci/pci.c