PCI/PM: Define pci_restore_standard_config() only for CONFIG_PM_SLEEP
authorKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Wed, 20 Apr 2022 14:11:35 +0000 (16:11 +0200)
committerBjorn Helgaas <bhelgaas@google.com>
Thu, 5 May 2022 19:10:24 +0000 (14:10 -0500)
commit18a94192e20de31e7e495d7c805c8930c42e99ef
tree83a3c120f022ad278d084495404e06f4d09dfea2
parent3123109284176b1532874591f7c81f3837bbdc17
PCI/PM: Define pci_restore_standard_config() only for CONFIG_PM_SLEEP

pci_restore_standard_config() was defined under CONFIG_PM but called only
by pci_pm_resume() (defined under CONFIG_SUSPEND) and pci_pm_restore()
(defined under CONFIG_HIBERNATE_CALLBACKS).  A configuration with only
CONFIG_PM leads to a warning:

  drivers/pci/pci-driver.c:533:12: error: ‘pci_restore_standard_config’ defined but not used [-Werror=unused-function]

CONFIG_PM_SLEEP depends on CONFIG_SUSPEND and CONFIG_HIBERNATE_CALLBACKS,
so define pci_restore_standard_config() under that instead.

Link: https://lore.kernel.org/r/20220420141135.444820-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
drivers/pci/pci-driver.c