diff options
author | Bjorn Helgaas <bhelgaas@google.com> | 2022-07-19 23:13:25 +0200 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2022-07-27 18:56:17 +0200 |
commit | 19b7858c3357df038d896c10e0d5e4572a77dd25 (patch) | |
tree | 916cccbe1644bd8e8b245b45574a9d9c0dd1a14a /drivers/pci/controller/pcie-rcar-host.c | |
parent | Linux 5.19-rc1 (diff) | |
download | linux-19b7858c3357df038d896c10e0d5e4572a77dd25.tar.xz linux-19b7858c3357df038d896c10e0d5e4572a77dd25.zip |
PCI: Convert to new *_PM_OPS macros
Replace SET_*_PM_OPS with *_PM_OPS, which which have the advantage that the
compiler always sees the PM callbacks as referenced, so they don't need to
be wrapped with "#ifdef CONFIG_PM_SLEEP" or tagged with "__maybe_unused" to
avoid "defined but not used" warnings.
See 1a3c7bb08826 ("PM: core: Add new *_PM_OPS macros, deprecate old ones").
Link: https://lore.kernel.org/r/20220719215108.1583108-1-helgaas@kernel.org
Tested-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Pali Rohár <pali@kernel.org> # pci-mvebu.c
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'drivers/pci/controller/pcie-rcar-host.c')
-rw-r--r-- | drivers/pci/controller/pcie-rcar-host.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/pci/controller/pcie-rcar-host.c b/drivers/pci/controller/pcie-rcar-host.c index 997c4df6a1e7..e4faf90feaf5 100644 --- a/drivers/pci/controller/pcie-rcar-host.c +++ b/drivers/pci/controller/pcie-rcar-host.c @@ -1072,7 +1072,7 @@ err_pm_put: return err; } -static int __maybe_unused rcar_pcie_resume(struct device *dev) +static int rcar_pcie_resume(struct device *dev) { struct rcar_pcie_host *host = dev_get_drvdata(dev); struct rcar_pcie *pcie = &host->pcie; @@ -1127,7 +1127,7 @@ static int rcar_pcie_resume_noirq(struct device *dev) } static const struct dev_pm_ops rcar_pcie_pm_ops = { - SET_SYSTEM_SLEEP_PM_OPS(NULL, rcar_pcie_resume) + SYSTEM_SLEEP_PM_OPS(NULL, rcar_pcie_resume) .resume_noirq = rcar_pcie_resume_noirq, }; |