Skip to content

Commit

Permalink
Merge branch 'fixes' of git://git.infradead.org/users/vkoul/slave-dma
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Linus Torvalds committed Jan 17, 2015
2 parents 59b2858 + 6acf399 commit 298e320
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -3183,7 +3183,7 @@ L: dmaengine@vger.kernel.org
Q: https://patchwork.kernel.org/project/linux-dmaengine/list/
S: Maintained
F: drivers/dma/
F: include/linux/dma*
F: include/linux/dmaengine.h
F: Documentation/dmaengine/
T: git git://git.infradead.org/users/vkoul/slave-dma.git

Expand Down
2 changes: 0 additions & 2 deletions drivers/dma/dw/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1505,7 +1505,6 @@ int dw_dma_probe(struct dw_dma_chip *chip, struct dw_dma_platform_data *pdata)
dw->regs = chip->regs;
chip->dw = dw;

pm_runtime_enable(chip->dev);
pm_runtime_get_sync(chip->dev);

dw_params = dma_read_byaddr(chip->regs, DW_PARAMS);
Expand Down Expand Up @@ -1703,7 +1702,6 @@ int dw_dma_remove(struct dw_dma_chip *chip)
}

pm_runtime_put_sync_suspend(chip->dev);
pm_runtime_disable(chip->dev);
return 0;
}
EXPORT_SYMBOL_GPL(dw_dma_remove);
Expand Down
5 changes: 5 additions & 0 deletions drivers/dma/dw/platform.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
#include <linux/module.h>
#include <linux/device.h>
#include <linux/clk.h>
#include <linux/pm_runtime.h>
#include <linux/platform_device.h>
#include <linux/dmaengine.h>
#include <linux/dma-mapping.h>
Expand Down Expand Up @@ -185,6 +186,8 @@ static int dw_probe(struct platform_device *pdev)
if (err)
return err;

pm_runtime_enable(&pdev->dev);

err = dw_dma_probe(chip, pdata);
if (err)
goto err_dw_dma_probe;
Expand All @@ -205,6 +208,7 @@ static int dw_probe(struct platform_device *pdev)
return 0;

err_dw_dma_probe:
pm_runtime_disable(&pdev->dev);
clk_disable_unprepare(chip->clk);
return err;
}
Expand All @@ -217,6 +221,7 @@ static int dw_remove(struct platform_device *pdev)
of_dma_controller_free(pdev->dev.of_node);

dw_dma_remove(chip);
pm_runtime_disable(&pdev->dev);
clk_disable_unprepare(chip->clk);

return 0;
Expand Down

0 comments on commit 298e320

Please sign in to comment.