aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/drivers/dma/dw/pci.c
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2025-02-05 17:06:48 +0200
committerVinod Koul <vkoul@kernel.org>2025-02-10 16:29:11 +0530
commit1e137d53e8471b45257d937e9773b61a88807fe7 (patch)
tree8f7f02bd087c23594e69c457d4f36cc46cf963a4 /drivers/dma/dw/pci.c
parentdmaengine: Unify checks in dma_request_chan() (diff)
downloadwireguard-linux-1e137d53e8471b45257d937e9773b61a88807fe7.tar.xz
wireguard-linux-1e137d53e8471b45257d937e9773b61a88807fe7.zip
dmaengine: dw: Switch to LATE_SIMPLE_DEV_PM_OPS()
SET_LATE_SYSTEM_SLEEP_PM_OPS is deprecated, replace it with LATE_SYSTEM_SLEEP_PM_OPS() and use pm_sleep_ptr() for setting the driver's pm routines. We can now remove the ifdeffery in the suspend and resume functions. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: Viresh Kumar <viresh.kumar@linaro.org> Reviewed-by: Serge Semin <fancer.lancer@gmail.com> Link: https://lore.kernel.org/r/20250205150701.893083-1-andriy.shevchenko@linux.intel.com Signed-off-by: Vinod Koul <vkoul@kernel.org>
Diffstat (limited to 'drivers/dma/dw/pci.c')
-rw-r--r--drivers/dma/dw/pci.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/dma/dw/pci.c b/drivers/dma/dw/pci.c
index e8a0eb81726a..a3aae3d1c093 100644
--- a/drivers/dma/dw/pci.c
+++ b/drivers/dma/dw/pci.c
@@ -76,8 +76,6 @@ static void dw_pci_remove(struct pci_dev *pdev)
dev_warn(&pdev->dev, "can't remove device properly: %d\n", ret);
}
-#ifdef CONFIG_PM_SLEEP
-
static int dw_pci_suspend_late(struct device *dev)
{
struct dw_dma_chip_pdata *data = dev_get_drvdata(dev);
@@ -94,10 +92,8 @@ static int dw_pci_resume_early(struct device *dev)
return do_dw_dma_enable(chip);
};
-#endif /* CONFIG_PM_SLEEP */
-
static const struct dev_pm_ops dw_pci_dev_pm_ops = {
- SET_LATE_SYSTEM_SLEEP_PM_OPS(dw_pci_suspend_late, dw_pci_resume_early)
+ LATE_SYSTEM_SLEEP_PM_OPS(dw_pci_suspend_late, dw_pci_resume_early)
};
static const struct pci_device_id dw_pci_id_table[] = {
@@ -136,7 +132,7 @@ static struct pci_driver dw_pci_driver = {
.probe = dw_pci_probe,
.remove = dw_pci_remove,
.driver = {
- .pm = &dw_pci_dev_pm_ops,
+ .pm = pm_sleep_ptr(&dw_pci_dev_pm_ops),
},
};