Commit ed89d69a authored by Bjorn Helgaas's avatar Bjorn Helgaas

Merge branch 'pci/ctrl/pm-ops'

- Convert to new *_PM_OPS macros to avoid need for "#ifdef CONFIG_PM_SLEEP"
  or "__maybe_unused" (Bjorn Helgaas)

* pci/ctrl/pm-ops:
  PCI: Convert to new *_PM_OPS macros
parents 56ebef0a 19b7858c
...@@ -243,7 +243,6 @@ int cdns_pcie_init_phy(struct device *dev, struct cdns_pcie *pcie) ...@@ -243,7 +243,6 @@ int cdns_pcie_init_phy(struct device *dev, struct cdns_pcie *pcie)
return ret; return ret;
} }
#ifdef CONFIG_PM_SLEEP
static int cdns_pcie_suspend_noirq(struct device *dev) static int cdns_pcie_suspend_noirq(struct device *dev)
{ {
struct cdns_pcie *pcie = dev_get_drvdata(dev); struct cdns_pcie *pcie = dev_get_drvdata(dev);
...@@ -266,9 +265,8 @@ static int cdns_pcie_resume_noirq(struct device *dev) ...@@ -266,9 +265,8 @@ static int cdns_pcie_resume_noirq(struct device *dev)
return 0; return 0;
} }
#endif
const struct dev_pm_ops cdns_pcie_pm_ops = { const struct dev_pm_ops cdns_pcie_pm_ops = {
SET_NOIRQ_SYSTEM_SLEEP_PM_OPS(cdns_pcie_suspend_noirq, NOIRQ_SYSTEM_SLEEP_PM_OPS(cdns_pcie_suspend_noirq,
cdns_pcie_resume_noirq) cdns_pcie_resume_noirq)
}; };
...@@ -862,7 +862,6 @@ static int dra7xx_pcie_probe(struct platform_device *pdev) ...@@ -862,7 +862,6 @@ static int dra7xx_pcie_probe(struct platform_device *pdev)
return ret; return ret;
} }
#ifdef CONFIG_PM_SLEEP
static int dra7xx_pcie_suspend(struct device *dev) static int dra7xx_pcie_suspend(struct device *dev)
{ {
struct dra7xx_pcie *dra7xx = dev_get_drvdata(dev); struct dra7xx_pcie *dra7xx = dev_get_drvdata(dev);
...@@ -919,7 +918,6 @@ static int dra7xx_pcie_resume_noirq(struct device *dev) ...@@ -919,7 +918,6 @@ static int dra7xx_pcie_resume_noirq(struct device *dev)
return 0; return 0;
} }
#endif
static void dra7xx_pcie_shutdown(struct platform_device *pdev) static void dra7xx_pcie_shutdown(struct platform_device *pdev)
{ {
...@@ -940,8 +938,8 @@ static void dra7xx_pcie_shutdown(struct platform_device *pdev) ...@@ -940,8 +938,8 @@ static void dra7xx_pcie_shutdown(struct platform_device *pdev)
} }
static const struct dev_pm_ops dra7xx_pcie_pm_ops = { static const struct dev_pm_ops dra7xx_pcie_pm_ops = {
SET_SYSTEM_SLEEP_PM_OPS(dra7xx_pcie_suspend, dra7xx_pcie_resume) SYSTEM_SLEEP_PM_OPS(dra7xx_pcie_suspend, dra7xx_pcie_resume)
SET_NOIRQ_SYSTEM_SLEEP_PM_OPS(dra7xx_pcie_suspend_noirq, NOIRQ_SYSTEM_SLEEP_PM_OPS(dra7xx_pcie_suspend_noirq,
dra7xx_pcie_resume_noirq) dra7xx_pcie_resume_noirq)
}; };
......
...@@ -389,7 +389,7 @@ static int __exit exynos_pcie_remove(struct platform_device *pdev) ...@@ -389,7 +389,7 @@ static int __exit exynos_pcie_remove(struct platform_device *pdev)
return 0; return 0;
} }
static int __maybe_unused exynos_pcie_suspend_noirq(struct device *dev) static int exynos_pcie_suspend_noirq(struct device *dev)
{ {
struct exynos_pcie *ep = dev_get_drvdata(dev); struct exynos_pcie *ep = dev_get_drvdata(dev);
...@@ -401,7 +401,7 @@ static int __maybe_unused exynos_pcie_suspend_noirq(struct device *dev) ...@@ -401,7 +401,7 @@ static int __maybe_unused exynos_pcie_suspend_noirq(struct device *dev)
return 0; return 0;
} }
static int __maybe_unused exynos_pcie_resume_noirq(struct device *dev) static int exynos_pcie_resume_noirq(struct device *dev)
{ {
struct exynos_pcie *ep = dev_get_drvdata(dev); struct exynos_pcie *ep = dev_get_drvdata(dev);
struct dw_pcie *pci = &ep->pci; struct dw_pcie *pci = &ep->pci;
...@@ -420,7 +420,7 @@ static int __maybe_unused exynos_pcie_resume_noirq(struct device *dev) ...@@ -420,7 +420,7 @@ static int __maybe_unused exynos_pcie_resume_noirq(struct device *dev)
} }
static const struct dev_pm_ops exynos_pcie_pm_ops = { static const struct dev_pm_ops exynos_pcie_pm_ops = {
SET_NOIRQ_SYSTEM_SLEEP_PM_OPS(exynos_pcie_suspend_noirq, NOIRQ_SYSTEM_SLEEP_PM_OPS(exynos_pcie_suspend_noirq,
exynos_pcie_resume_noirq) exynos_pcie_resume_noirq)
}; };
......
...@@ -351,7 +351,7 @@ static int intel_pcie_remove(struct platform_device *pdev) ...@@ -351,7 +351,7 @@ static int intel_pcie_remove(struct platform_device *pdev)
return 0; return 0;
} }
static int __maybe_unused intel_pcie_suspend_noirq(struct device *dev) static int intel_pcie_suspend_noirq(struct device *dev)
{ {
struct intel_pcie *pcie = dev_get_drvdata(dev); struct intel_pcie *pcie = dev_get_drvdata(dev);
int ret; int ret;
...@@ -366,7 +366,7 @@ static int __maybe_unused intel_pcie_suspend_noirq(struct device *dev) ...@@ -366,7 +366,7 @@ static int __maybe_unused intel_pcie_suspend_noirq(struct device *dev)
return ret; return ret;
} }
static int __maybe_unused intel_pcie_resume_noirq(struct device *dev) static int intel_pcie_resume_noirq(struct device *dev)
{ {
struct intel_pcie *pcie = dev_get_drvdata(dev); struct intel_pcie *pcie = dev_get_drvdata(dev);
...@@ -432,7 +432,7 @@ static int intel_pcie_probe(struct platform_device *pdev) ...@@ -432,7 +432,7 @@ static int intel_pcie_probe(struct platform_device *pdev)
} }
static const struct dev_pm_ops intel_pcie_pm_ops = { static const struct dev_pm_ops intel_pcie_pm_ops = {
SET_NOIRQ_SYSTEM_SLEEP_PM_OPS(intel_pcie_suspend_noirq, NOIRQ_SYSTEM_SLEEP_PM_OPS(intel_pcie_suspend_noirq,
intel_pcie_resume_noirq) intel_pcie_resume_noirq)
}; };
......
...@@ -1216,7 +1216,6 @@ static int mvebu_get_tgt_attr(struct device_node *np, int devfn, ...@@ -1216,7 +1216,6 @@ static int mvebu_get_tgt_attr(struct device_node *np, int devfn,
return -ENOENT; return -ENOENT;
} }
#ifdef CONFIG_PM_SLEEP
static int mvebu_pcie_suspend(struct device *dev) static int mvebu_pcie_suspend(struct device *dev)
{ {
struct mvebu_pcie *pcie; struct mvebu_pcie *pcie;
...@@ -1249,7 +1248,6 @@ static int mvebu_pcie_resume(struct device *dev) ...@@ -1249,7 +1248,6 @@ static int mvebu_pcie_resume(struct device *dev)
return 0; return 0;
} }
#endif
static void mvebu_pcie_port_clk_put(void *data) static void mvebu_pcie_port_clk_put(void *data)
{ {
...@@ -1737,7 +1735,7 @@ static const struct of_device_id mvebu_pcie_of_match_table[] = { ...@@ -1737,7 +1735,7 @@ static const struct of_device_id mvebu_pcie_of_match_table[] = {
}; };
static const struct dev_pm_ops mvebu_pcie_pm_ops = { static const struct dev_pm_ops mvebu_pcie_pm_ops = {
SET_NOIRQ_SYSTEM_SLEEP_PM_OPS(mvebu_pcie_suspend, mvebu_pcie_resume) NOIRQ_SYSTEM_SLEEP_PM_OPS(mvebu_pcie_suspend, mvebu_pcie_resume)
}; };
static struct platform_driver mvebu_pcie_driver = { static struct platform_driver mvebu_pcie_driver = {
......
...@@ -2707,7 +2707,7 @@ static int tegra_pcie_remove(struct platform_device *pdev) ...@@ -2707,7 +2707,7 @@ static int tegra_pcie_remove(struct platform_device *pdev)
return 0; return 0;
} }
static int __maybe_unused tegra_pcie_pm_suspend(struct device *dev) static int tegra_pcie_pm_suspend(struct device *dev)
{ {
struct tegra_pcie *pcie = dev_get_drvdata(dev); struct tegra_pcie *pcie = dev_get_drvdata(dev);
struct tegra_pcie_port *port; struct tegra_pcie_port *port;
...@@ -2742,7 +2742,7 @@ static int __maybe_unused tegra_pcie_pm_suspend(struct device *dev) ...@@ -2742,7 +2742,7 @@ static int __maybe_unused tegra_pcie_pm_suspend(struct device *dev)
return 0; return 0;
} }
static int __maybe_unused tegra_pcie_pm_resume(struct device *dev) static int tegra_pcie_pm_resume(struct device *dev)
{ {
struct tegra_pcie *pcie = dev_get_drvdata(dev); struct tegra_pcie *pcie = dev_get_drvdata(dev);
int err; int err;
...@@ -2798,9 +2798,8 @@ static int __maybe_unused tegra_pcie_pm_resume(struct device *dev) ...@@ -2798,9 +2798,8 @@ static int __maybe_unused tegra_pcie_pm_resume(struct device *dev)
} }
static const struct dev_pm_ops tegra_pcie_pm_ops = { static const struct dev_pm_ops tegra_pcie_pm_ops = {
SET_RUNTIME_PM_OPS(tegra_pcie_pm_suspend, tegra_pcie_pm_resume, NULL) RUNTIME_PM_OPS(tegra_pcie_pm_suspend, tegra_pcie_pm_resume, NULL)
SET_NOIRQ_SYSTEM_SLEEP_PM_OPS(tegra_pcie_pm_suspend, NOIRQ_SYSTEM_SLEEP_PM_OPS(tegra_pcie_pm_suspend, tegra_pcie_pm_resume)
tegra_pcie_pm_resume)
}; };
static struct platform_driver tegra_pcie_driver = { static struct platform_driver tegra_pcie_driver = {
......
...@@ -959,7 +959,7 @@ static int mtk_pcie_remove(struct platform_device *pdev) ...@@ -959,7 +959,7 @@ static int mtk_pcie_remove(struct platform_device *pdev)
return 0; return 0;
} }
static void __maybe_unused mtk_pcie_irq_save(struct mtk_gen3_pcie *pcie) static void mtk_pcie_irq_save(struct mtk_gen3_pcie *pcie)
{ {
int i; int i;
...@@ -977,7 +977,7 @@ static void __maybe_unused mtk_pcie_irq_save(struct mtk_gen3_pcie *pcie) ...@@ -977,7 +977,7 @@ static void __maybe_unused mtk_pcie_irq_save(struct mtk_gen3_pcie *pcie)
raw_spin_unlock(&pcie->irq_lock); raw_spin_unlock(&pcie->irq_lock);
} }
static void __maybe_unused mtk_pcie_irq_restore(struct mtk_gen3_pcie *pcie) static void mtk_pcie_irq_restore(struct mtk_gen3_pcie *pcie)
{ {
int i; int i;
...@@ -995,7 +995,7 @@ static void __maybe_unused mtk_pcie_irq_restore(struct mtk_gen3_pcie *pcie) ...@@ -995,7 +995,7 @@ static void __maybe_unused mtk_pcie_irq_restore(struct mtk_gen3_pcie *pcie)
raw_spin_unlock(&pcie->irq_lock); raw_spin_unlock(&pcie->irq_lock);
} }
static int __maybe_unused mtk_pcie_turn_off_link(struct mtk_gen3_pcie *pcie) static int mtk_pcie_turn_off_link(struct mtk_gen3_pcie *pcie)
{ {
u32 val; u32 val;
...@@ -1010,7 +1010,7 @@ static int __maybe_unused mtk_pcie_turn_off_link(struct mtk_gen3_pcie *pcie) ...@@ -1010,7 +1010,7 @@ static int __maybe_unused mtk_pcie_turn_off_link(struct mtk_gen3_pcie *pcie)
50 * USEC_PER_MSEC); 50 * USEC_PER_MSEC);
} }
static int __maybe_unused mtk_pcie_suspend_noirq(struct device *dev) static int mtk_pcie_suspend_noirq(struct device *dev)
{ {
struct mtk_gen3_pcie *pcie = dev_get_drvdata(dev); struct mtk_gen3_pcie *pcie = dev_get_drvdata(dev);
int err; int err;
...@@ -1036,7 +1036,7 @@ static int __maybe_unused mtk_pcie_suspend_noirq(struct device *dev) ...@@ -1036,7 +1036,7 @@ static int __maybe_unused mtk_pcie_suspend_noirq(struct device *dev)
return 0; return 0;
} }
static int __maybe_unused mtk_pcie_resume_noirq(struct device *dev) static int mtk_pcie_resume_noirq(struct device *dev)
{ {
struct mtk_gen3_pcie *pcie = dev_get_drvdata(dev); struct mtk_gen3_pcie *pcie = dev_get_drvdata(dev);
int err; int err;
...@@ -1057,7 +1057,7 @@ static int __maybe_unused mtk_pcie_resume_noirq(struct device *dev) ...@@ -1057,7 +1057,7 @@ static int __maybe_unused mtk_pcie_resume_noirq(struct device *dev)
} }
static const struct dev_pm_ops mtk_pcie_pm_ops = { static const struct dev_pm_ops mtk_pcie_pm_ops = {
SET_NOIRQ_SYSTEM_SLEEP_PM_OPS(mtk_pcie_suspend_noirq, NOIRQ_SYSTEM_SLEEP_PM_OPS(mtk_pcie_suspend_noirq,
mtk_pcie_resume_noirq) mtk_pcie_resume_noirq)
}; };
......
...@@ -1150,7 +1150,7 @@ static int mtk_pcie_remove(struct platform_device *pdev) ...@@ -1150,7 +1150,7 @@ static int mtk_pcie_remove(struct platform_device *pdev)
return 0; return 0;
} }
static int __maybe_unused mtk_pcie_suspend_noirq(struct device *dev) static int mtk_pcie_suspend_noirq(struct device *dev)
{ {
struct mtk_pcie *pcie = dev_get_drvdata(dev); struct mtk_pcie *pcie = dev_get_drvdata(dev);
struct mtk_pcie_port *port; struct mtk_pcie_port *port;
...@@ -1174,7 +1174,7 @@ static int __maybe_unused mtk_pcie_suspend_noirq(struct device *dev) ...@@ -1174,7 +1174,7 @@ static int __maybe_unused mtk_pcie_suspend_noirq(struct device *dev)
return 0; return 0;
} }
static int __maybe_unused mtk_pcie_resume_noirq(struct device *dev) static int mtk_pcie_resume_noirq(struct device *dev)
{ {
struct mtk_pcie *pcie = dev_get_drvdata(dev); struct mtk_pcie *pcie = dev_get_drvdata(dev);
struct mtk_pcie_port *port, *tmp; struct mtk_pcie_port *port, *tmp;
...@@ -1195,7 +1195,7 @@ static int __maybe_unused mtk_pcie_resume_noirq(struct device *dev) ...@@ -1195,7 +1195,7 @@ static int __maybe_unused mtk_pcie_resume_noirq(struct device *dev)
} }
static const struct dev_pm_ops mtk_pcie_pm_ops = { static const struct dev_pm_ops mtk_pcie_pm_ops = {
SET_NOIRQ_SYSTEM_SLEEP_PM_OPS(mtk_pcie_suspend_noirq, NOIRQ_SYSTEM_SLEEP_PM_OPS(mtk_pcie_suspend_noirq,
mtk_pcie_resume_noirq) mtk_pcie_resume_noirq)
}; };
......
...@@ -1072,7 +1072,7 @@ static int rcar_pcie_probe(struct platform_device *pdev) ...@@ -1072,7 +1072,7 @@ static int rcar_pcie_probe(struct platform_device *pdev)
return err; 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_host *host = dev_get_drvdata(dev);
struct rcar_pcie *pcie = &host->pcie; struct rcar_pcie *pcie = &host->pcie;
...@@ -1127,7 +1127,7 @@ static int rcar_pcie_resume_noirq(struct device *dev) ...@@ -1127,7 +1127,7 @@ static int rcar_pcie_resume_noirq(struct device *dev)
} }
static const struct dev_pm_ops rcar_pcie_pm_ops = { 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, .resume_noirq = rcar_pcie_resume_noirq,
}; };
......
...@@ -864,7 +864,7 @@ static int rockchip_pcie_wait_l2(struct rockchip_pcie *rockchip) ...@@ -864,7 +864,7 @@ static int rockchip_pcie_wait_l2(struct rockchip_pcie *rockchip)
return 0; return 0;
} }
static int __maybe_unused rockchip_pcie_suspend_noirq(struct device *dev) static int rockchip_pcie_suspend_noirq(struct device *dev)
{ {
struct rockchip_pcie *rockchip = dev_get_drvdata(dev); struct rockchip_pcie *rockchip = dev_get_drvdata(dev);
int ret; int ret;
...@@ -889,7 +889,7 @@ static int __maybe_unused rockchip_pcie_suspend_noirq(struct device *dev) ...@@ -889,7 +889,7 @@ static int __maybe_unused rockchip_pcie_suspend_noirq(struct device *dev)
return ret; return ret;
} }
static int __maybe_unused rockchip_pcie_resume_noirq(struct device *dev) static int rockchip_pcie_resume_noirq(struct device *dev)
{ {
struct rockchip_pcie *rockchip = dev_get_drvdata(dev); struct rockchip_pcie *rockchip = dev_get_drvdata(dev);
int err; int err;
...@@ -1035,7 +1035,7 @@ static int rockchip_pcie_remove(struct platform_device *pdev) ...@@ -1035,7 +1035,7 @@ static int rockchip_pcie_remove(struct platform_device *pdev)
} }
static const struct dev_pm_ops rockchip_pcie_pm_ops = { static const struct dev_pm_ops rockchip_pcie_pm_ops = {
SET_NOIRQ_SYSTEM_SLEEP_PM_OPS(rockchip_pcie_suspend_noirq, NOIRQ_SYSTEM_SLEEP_PM_OPS(rockchip_pcie_suspend_noirq,
rockchip_pcie_resume_noirq) rockchip_pcie_resume_noirq)
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment