diff options
| -rw-r--r-- | drivers/dma/dw/platform.c | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/drivers/dma/dw/platform.c b/drivers/dma/dw/platform.c index 453822cc4f9d..c5b339af6be5 100644 --- a/drivers/dma/dw/platform.c +++ b/drivers/dma/dw/platform.c | |||
| @@ -256,7 +256,7 @@ MODULE_DEVICE_TABLE(acpi, dw_dma_acpi_id_table); | |||
| 256 | 256 | ||
| 257 | #ifdef CONFIG_PM_SLEEP | 257 | #ifdef CONFIG_PM_SLEEP |
| 258 | 258 | ||
| 259 | static int dw_suspend_noirq(struct device *dev) | 259 | static int dw_suspend_late(struct device *dev) |
| 260 | { | 260 | { |
| 261 | struct platform_device *pdev = to_platform_device(dev); | 261 | struct platform_device *pdev = to_platform_device(dev); |
| 262 | struct dw_dma_chip *chip = platform_get_drvdata(pdev); | 262 | struct dw_dma_chip *chip = platform_get_drvdata(pdev); |
| @@ -264,7 +264,7 @@ static int dw_suspend_noirq(struct device *dev) | |||
| 264 | return dw_dma_suspend(chip); | 264 | return dw_dma_suspend(chip); |
| 265 | } | 265 | } |
| 266 | 266 | ||
| 267 | static int dw_resume_noirq(struct device *dev) | 267 | static int dw_resume_early(struct device *dev) |
| 268 | { | 268 | { |
| 269 | struct platform_device *pdev = to_platform_device(dev); | 269 | struct platform_device *pdev = to_platform_device(dev); |
| 270 | struct dw_dma_chip *chip = platform_get_drvdata(pdev); | 270 | struct dw_dma_chip *chip = platform_get_drvdata(pdev); |
| @@ -272,20 +272,10 @@ static int dw_resume_noirq(struct device *dev) | |||
| 272 | return dw_dma_resume(chip); | 272 | return dw_dma_resume(chip); |
| 273 | } | 273 | } |
| 274 | 274 | ||
| 275 | #else /* !CONFIG_PM_SLEEP */ | 275 | #endif /* CONFIG_PM_SLEEP */ |
| 276 | |||
| 277 | #define dw_suspend_noirq NULL | ||
| 278 | #define dw_resume_noirq NULL | ||
| 279 | |||
| 280 | #endif /* !CONFIG_PM_SLEEP */ | ||
| 281 | 276 | ||
| 282 | static const struct dev_pm_ops dw_dev_pm_ops = { | 277 | static const struct dev_pm_ops dw_dev_pm_ops = { |
| 283 | .suspend_noirq = dw_suspend_noirq, | 278 | SET_LATE_SYSTEM_SLEEP_PM_OPS(dw_suspend_late, dw_resume_early) |
| 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, | ||
| 289 | }; | 279 | }; |
| 290 | 280 | ||
| 291 | static struct platform_driver dw_driver = { | 281 | static struct platform_driver dw_driver = { |
