diff options
author | Vinod Koul <vinod.koul@intel.com> | 2011-06-09 12:37:05 -0400 |
---|---|---|
committer | Vinod Koul <vinod.koul@intel.com> | 2011-06-09 12:37:05 -0400 |
commit | 4b28d81a7ed82b906f1fdec0133d597b9cf57f85 (patch) | |
tree | fc722c2bafb704c0db35599392d8f8dddbb4e36d /drivers/dma | |
parent | 114df7d66efd5c23561782f38e97c48fb30d4f5d (diff) | |
parent | 626a96db11698119a67eeda130488e869aa6f14e (diff) |
Merge remote branch 'gpio/ep93xx-dma' into next
Diffstat (limited to 'drivers/dma')
-rw-r--r-- | drivers/dma/shdma.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/dma/shdma.c b/drivers/dma/shdma.c index 636e40925b16..2a638f9f09a2 100644 --- a/drivers/dma/shdma.c +++ b/drivers/dma/shdma.c | |||
@@ -343,7 +343,7 @@ static int sh_dmae_alloc_chan_resources(struct dma_chan *chan) | |||
343 | 343 | ||
344 | dmae_set_dmars(sh_chan, cfg->mid_rid); | 344 | dmae_set_dmars(sh_chan, cfg->mid_rid); |
345 | dmae_set_chcr(sh_chan, cfg->chcr); | 345 | dmae_set_chcr(sh_chan, cfg->chcr); |
346 | } else if ((sh_dmae_readl(sh_chan, CHCR) & 0xf00) != 0x400) { | 346 | } else { |
347 | dmae_init(sh_chan); | 347 | dmae_init(sh_chan); |
348 | } | 348 | } |
349 | 349 | ||
@@ -1144,6 +1144,8 @@ static int __init sh_dmae_probe(struct platform_device *pdev) | |||
1144 | /* platform data */ | 1144 | /* platform data */ |
1145 | shdev->pdata = pdata; | 1145 | shdev->pdata = pdata; |
1146 | 1146 | ||
1147 | platform_set_drvdata(pdev, shdev); | ||
1148 | |||
1147 | pm_runtime_enable(&pdev->dev); | 1149 | pm_runtime_enable(&pdev->dev); |
1148 | pm_runtime_get_sync(&pdev->dev); | 1150 | pm_runtime_get_sync(&pdev->dev); |
1149 | 1151 | ||
@@ -1256,7 +1258,6 @@ static int __init sh_dmae_probe(struct platform_device *pdev) | |||
1256 | 1258 | ||
1257 | pm_runtime_put(&pdev->dev); | 1259 | pm_runtime_put(&pdev->dev); |
1258 | 1260 | ||
1259 | platform_set_drvdata(pdev, shdev); | ||
1260 | dma_async_device_register(&shdev->common); | 1261 | dma_async_device_register(&shdev->common); |
1261 | 1262 | ||
1262 | return err; | 1263 | return err; |
@@ -1278,6 +1279,8 @@ rst_err: | |||
1278 | 1279 | ||
1279 | if (dmars) | 1280 | if (dmars) |
1280 | iounmap(shdev->dmars); | 1281 | iounmap(shdev->dmars); |
1282 | |||
1283 | platform_set_drvdata(pdev, NULL); | ||
1281 | emapdmars: | 1284 | emapdmars: |
1282 | iounmap(shdev->chan_reg); | 1285 | iounmap(shdev->chan_reg); |
1283 | synchronize_rcu(); | 1286 | synchronize_rcu(); |
@@ -1316,6 +1319,8 @@ static int __exit sh_dmae_remove(struct platform_device *pdev) | |||
1316 | iounmap(shdev->dmars); | 1319 | iounmap(shdev->dmars); |
1317 | iounmap(shdev->chan_reg); | 1320 | iounmap(shdev->chan_reg); |
1318 | 1321 | ||
1322 | platform_set_drvdata(pdev, NULL); | ||
1323 | |||
1319 | synchronize_rcu(); | 1324 | synchronize_rcu(); |
1320 | kfree(shdev); | 1325 | kfree(shdev); |
1321 | 1326 | ||