diff options
author | Tony Lindgren <tony@atomide.com> | 2016-11-09 11:47:58 -0500 |
---|---|---|
committer | Vinod Koul <vinod.koul@intel.com> | 2016-11-14 00:27:21 -0500 |
commit | 12f5908080bdccca2cb2f7ad850cb360c92f481a (patch) | |
tree | a9a9863c7e5bcb9879d90c009c70f1bcd536f608 /drivers | |
parent | f732c5b7c734cfc2c563c918fe2842175c7eb073 (diff) |
dmaengine: cppi41: Fix list not empty warning on module removal
If musb controller is configured with USB peripherals and we have
enumerated with a USB host, we can get warnings on removal of the
modules:
WARNING: CPU: 0 PID: 1269 at drivers/dma/cppi41.c:391
cppi41_dma_free_chan_resources
Fix the issue by adding the missing pm_runtime_get to
cppi41_dma_free_chan_resources to make sure the pending work
list is cleared on removal.
Fixes: fdea2d09b997 ("dmaengine: cppi41: Add basic PM runtime support")
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/dma/cppi41.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/dma/cppi41.c b/drivers/dma/cppi41.c index bac5f023013b..6ed99d926358 100644 --- a/drivers/dma/cppi41.c +++ b/drivers/dma/cppi41.c | |||
@@ -1072,7 +1072,12 @@ err_get_sync: | |||
1072 | static int cppi41_dma_remove(struct platform_device *pdev) | 1072 | static int cppi41_dma_remove(struct platform_device *pdev) |
1073 | { | 1073 | { |
1074 | struct cppi41_dd *cdd = platform_get_drvdata(pdev); | 1074 | struct cppi41_dd *cdd = platform_get_drvdata(pdev); |
1075 | int error; | ||
1075 | 1076 | ||
1077 | error = pm_runtime_get_sync(&pdev->dev); | ||
1078 | if (error < 0) | ||
1079 | dev_err(&pdev->dev, "%s could not pm_runtime_get: %i\n", | ||
1080 | __func__, error); | ||
1076 | of_dma_controller_free(pdev->dev.of_node); | 1081 | of_dma_controller_free(pdev->dev.of_node); |
1077 | dma_async_device_unregister(&cdd->ddev); | 1082 | dma_async_device_unregister(&cdd->ddev); |
1078 | 1083 | ||