PCI: PM: Make pci_choose_state() call pci_target_state()
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 29 Sep 2021 18:11:18 +0000 (20:11 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Tue, 5 Oct 2021 13:38:05 +0000 (15:38 +0200)
commit6407e5ecdc66cd9da760e751a7c092c87a683861
treead2baef3e00f4d0ccf24aa414e6637e929eb2b72
parentbf39c929f9053cd840155a1c39494c9a9946836b
PCI: PM: Make pci_choose_state() call pci_target_state()

The pci_choose_state() and pci_target_state() implementations are
somewhat divergent without a good reason, because they are used
for similar purposes.

Change the pci_choose_state() implementation to use pci_target_state()
internally except for transitions to the working state of the system
in which case it is expected to return D0.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Tested-by: Ferry Toth <fntoth@gmail.com>
drivers/pci/pci-acpi.c
drivers/pci/pci.c