提交 9d14ad61 编写于 作者: B Bjorn Helgaas

PCI: imx6: Convert to NOIRQ_SYSTEM_SLEEP_PM_OPS()

Replace SET_NOIRQ_SYSTEM_SLEEP_PM_OPS() with NOIRQ_SYSTEM_SLEEP_PM_OPS(),
which has 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 1a3c7bb0 ("PM: core: Add new *_PM_OPS macros, deprecate old ones").
Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
Reviewed-by: NArnd Bergmann <arnd@arndb.de>
上级 91a773f9
...@@ -884,7 +884,6 @@ static const struct dw_pcie_ops dw_pcie_ops = { ...@@ -884,7 +884,6 @@ static const struct dw_pcie_ops dw_pcie_ops = {
.start_link = imx6_pcie_start_link, .start_link = imx6_pcie_start_link,
}; };
#ifdef CONFIG_PM_SLEEP
static void imx6_pcie_ltssm_disable(struct device *dev) static void imx6_pcie_ltssm_disable(struct device *dev)
{ {
struct imx6_pcie *imx6_pcie = dev_get_drvdata(dev); struct imx6_pcie *imx6_pcie = dev_get_drvdata(dev);
...@@ -1008,11 +1007,10 @@ static int imx6_pcie_resume_noirq(struct device *dev) ...@@ -1008,11 +1007,10 @@ static int imx6_pcie_resume_noirq(struct device *dev)
return 0; return 0;
} }
#endif
static const struct dev_pm_ops imx6_pcie_pm_ops = { static const struct dev_pm_ops imx6_pcie_pm_ops = {
SET_NOIRQ_SYSTEM_SLEEP_PM_OPS(imx6_pcie_suspend_noirq, NOIRQ_SYSTEM_SLEEP_PM_OPS(imx6_pcie_suspend_noirq,
imx6_pcie_resume_noirq) imx6_pcie_resume_noirq)
}; };
static int imx6_pcie_probe(struct platform_device *pdev) static int imx6_pcie_probe(struct platform_device *pdev)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册