diff options
Diffstat (limited to 'drivers/dma/dw/platform.c')
-rw-r--r-- | drivers/dma/dw/platform.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/dma/dw/platform.c b/drivers/dma/dw/platform.c index a630161473a4..32ea1aca7a0e 100644 --- a/drivers/dma/dw/platform.c +++ b/drivers/dma/dw/platform.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/module.h> | 15 | #include <linux/module.h> |
16 | #include <linux/device.h> | 16 | #include <linux/device.h> |
17 | #include <linux/clk.h> | 17 | #include <linux/clk.h> |
18 | #include <linux/pm_runtime.h> | ||
18 | #include <linux/platform_device.h> | 19 | #include <linux/platform_device.h> |
19 | #include <linux/dmaengine.h> | 20 | #include <linux/dmaengine.h> |
20 | #include <linux/dma-mapping.h> | 21 | #include <linux/dma-mapping.h> |
@@ -185,6 +186,8 @@ static int dw_probe(struct platform_device *pdev) | |||
185 | if (err) | 186 | if (err) |
186 | return err; | 187 | return err; |
187 | 188 | ||
189 | pm_runtime_enable(&pdev->dev); | ||
190 | |||
188 | err = dw_dma_probe(chip, pdata); | 191 | err = dw_dma_probe(chip, pdata); |
189 | if (err) | 192 | if (err) |
190 | goto err_dw_dma_probe; | 193 | goto err_dw_dma_probe; |
@@ -205,6 +208,7 @@ static int dw_probe(struct platform_device *pdev) | |||
205 | return 0; | 208 | return 0; |
206 | 209 | ||
207 | err_dw_dma_probe: | 210 | err_dw_dma_probe: |
211 | pm_runtime_disable(&pdev->dev); | ||
208 | clk_disable_unprepare(chip->clk); | 212 | clk_disable_unprepare(chip->clk); |
209 | return err; | 213 | return err; |
210 | } | 214 | } |
@@ -217,6 +221,7 @@ static int dw_remove(struct platform_device *pdev) | |||
217 | of_dma_controller_free(pdev->dev.of_node); | 221 | of_dma_controller_free(pdev->dev.of_node); |
218 | 222 | ||
219 | dw_dma_remove(chip); | 223 | dw_dma_remove(chip); |
224 | pm_runtime_disable(&pdev->dev); | ||
220 | clk_disable_unprepare(chip->clk); | 225 | clk_disable_unprepare(chip->clk); |
221 | 226 | ||
222 | return 0; | 227 | return 0; |