summaryrefslogtreecommitdiffstats
path: root/drivers/dma/dw/pci.c
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2014-04-15 15:18:42 +0200
committerVinod Koul <vinod.koul@intel.com>2014-05-07 08:14:06 +0200
commitc31b6ae1b4a75680765ac66d80e2e107e8bf05a0 (patch)
tree0e3678831967597bc54664af96af3b2a60df3427 /drivers/dma/dw/pci.c
parentdmaengine: dw: move PM to suspend_late / resume_early stages (diff)
downloadlinux-c31b6ae1b4a75680765ac66d80e2e107e8bf05a0.tar.xz
linux-c31b6ae1b4a75680765ac66d80e2e107e8bf05a0.zip
dmaengine: dw: convert to use SET_LATE_SYSTEM_SLEEP_PM_OPS
The commit 4501fe61 "dma: dw: Add suspend and resume handling for PCI mode DW_DMAC." introduces system power management callbacks. Regarding to commit f78c4cff "PM / Sleep: Add macro to define common late/early system PM callbacks" we have nice macro to setup dev_pm_ops structure. This patch converts a driver to use the macro. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Diffstat (limited to 'drivers/dma/dw/pci.c')
-rw-r--r--drivers/dma/dw/pci.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/drivers/dma/dw/pci.c b/drivers/dma/dw/pci.c
index fec59f1a77bb..be81db780627 100644
--- a/drivers/dma/dw/pci.c
+++ b/drivers/dma/dw/pci.c
@@ -93,16 +93,10 @@ static int dw_pci_resume_early(struct device *dev)
return dw_dma_resume(chip);
};
-#else /* !CONFIG_PM_SLEEP */
-
-#define dw_pci_suspend_late NULL
-#define dw_pci_resume_early NULL
-
-#endif /* !CONFIG_PM_SLEEP */
+#endif /* CONFIG_PM_SLEEP */
static const struct dev_pm_ops dw_pci_dev_pm_ops = {
- .suspend_late = dw_pci_suspend_late,
- .resume_early = dw_pci_resume_early,
+ SET_LATE_SYSTEM_SLEEP_PM_OPS(dw_pci_suspend_late, dw_pci_resume_early)
};
static DEFINE_PCI_DEVICE_TABLE(dw_pci_id_table) = {