Commit 298e320431db1db52b9ddd6f242bb33a4ea2d094

Authored by Linus Torvalds

Merge branch 'fixes' of git://git.infradead.org/users/vkoul/slave-dma

Pull dmaengine fixes from Vinod Koul:
 "Two patches, the first by Andy to fix dw dmac runtime pm and second
  one by me to fix the dmaengine headers in MAINTAINERS"

* 'fixes' of git://git.infradead.org/users/vkoul/slave-dma:
  dmaengine: dw: balance PM runtime calls
  MAINTAINERS: dmaengine: fix the header file for dmaengine

Showing 3 changed files Side-by-side Diff

... ... @@ -3183,7 +3183,7 @@
3183 3183 Q: https://patchwork.kernel.org/project/linux-dmaengine/list/
3184 3184 S: Maintained
3185 3185 F: drivers/dma/
3186   -F: include/linux/dma*
  3186 +F: include/linux/dmaengine.h
3187 3187 F: Documentation/dmaengine/
3188 3188 T: git git://git.infradead.org/users/vkoul/slave-dma.git
3189 3189  
drivers/dma/dw/core.c
... ... @@ -1505,7 +1505,6 @@
1505 1505 dw->regs = chip->regs;
1506 1506 chip->dw = dw;
1507 1507  
1508   - pm_runtime_enable(chip->dev);
1509 1508 pm_runtime_get_sync(chip->dev);
1510 1509  
1511 1510 dw_params = dma_read_byaddr(chip->regs, DW_PARAMS);
... ... @@ -1703,7 +1702,6 @@
1703 1702 }
1704 1703  
1705 1704 pm_runtime_put_sync_suspend(chip->dev);
1706   - pm_runtime_disable(chip->dev);
1707 1705 return 0;
1708 1706 }
1709 1707 EXPORT_SYMBOL_GPL(dw_dma_remove);
drivers/dma/dw/platform.c
... ... @@ -15,6 +15,7 @@
15 15 #include <linux/module.h>
16 16 #include <linux/device.h>
17 17 #include <linux/clk.h>
  18 +#include <linux/pm_runtime.h>
18 19 #include <linux/platform_device.h>
19 20 #include <linux/dmaengine.h>
20 21 #include <linux/dma-mapping.h>
... ... @@ -185,6 +186,8 @@
185 186 if (err)
186 187 return err;
187 188  
  189 + pm_runtime_enable(&pdev->dev);
  190 +
188 191 err = dw_dma_probe(chip, pdata);
189 192 if (err)
190 193 goto err_dw_dma_probe;
... ... @@ -205,6 +208,7 @@
205 208 return 0;
206 209  
207 210 err_dw_dma_probe:
  211 + pm_runtime_disable(&pdev->dev);
208 212 clk_disable_unprepare(chip->clk);
209 213 return err;
210 214 }
... ... @@ -217,6 +221,7 @@
217 221 of_dma_controller_free(pdev->dev.of_node);
218 222  
219 223 dw_dma_remove(chip);
  224 + pm_runtime_disable(&pdev->dev);
220 225 clk_disable_unprepare(chip->clk);
221 226  
222 227 return 0;