Skip to content

Commit 067bd4f

Browse files
andy-shevVinod Koul
authored andcommitted
dmaengine: dw: move PM to suspend_late / resume_early stages
There is no need to use *_noirq version of suspend and resume PM callbacks. The suspend_late / resume_early suit better (it was discussed in [1]) and in future could be used for runtime PM support. [1] http://www.spinics.net/lists/kernel/msg1650974.html Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
1 parent baca66f commit 067bd4f

1 file changed

Lines changed: 4 additions & 14 deletions

File tree

‎drivers/dma/dw/platform.c‎

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -256,36 +256,26 @@ MODULE_DEVICE_TABLE(acpi, dw_dma_acpi_id_table);
256256

257257
#ifdef CONFIG_PM_SLEEP
258258

259-
static int dw_suspend_noirq(struct device *dev)
259+
static int dw_suspend_late(struct device *dev)
260260
{
261261
struct platform_device *pdev = to_platform_device(dev);
262262
struct dw_dma_chip *chip = platform_get_drvdata(pdev);
263263

264264
return dw_dma_suspend(chip);
265265
}
266266

267-
static int dw_resume_noirq(struct device *dev)
267+
static int dw_resume_early(struct device *dev)
268268
{
269269
struct platform_device *pdev = to_platform_device(dev);
270270
struct dw_dma_chip *chip = platform_get_drvdata(pdev);
271271

272272
return dw_dma_resume(chip);
273273
}
274274

275-
#else /* !CONFIG_PM_SLEEP */
276-
277-
#define dw_suspend_noirq NULL
278-
#define dw_resume_noirq NULL
279-
280-
#endif /* !CONFIG_PM_SLEEP */
275+
#endif /* CONFIG_PM_SLEEP */
281276

282277
static const struct dev_pm_ops dw_dev_pm_ops = {
283-
.suspend_noirq = dw_suspend_noirq,
284-
.resume_noirq = dw_resume_noirq,
285-
.freeze_noirq = dw_suspend_noirq,
286-
.thaw_noirq = dw_resume_noirq,
287-
.restore_noirq = dw_resume_noirq,
288-
.poweroff_noirq = dw_suspend_noirq,
278+
SET_LATE_SYSTEM_SLEEP_PM_OPS(dw_suspend_late, dw_resume_early)
289279
};
290280

291281
static struct platform_driver dw_driver = {

0 commit comments

Comments
 (0)