aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/dma
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2011-05-31 16:00:58 +0900
committerPaul Mundt <lethal@linux-sh.org>2011-05-31 16:00:58 +0900
commit1222de7c415cfa70f441f836588fd79a3334d4fe (patch)
treeadb1ff03eee4b2c9955ab11664548a529f6d2bc8 /drivers/dma
parentdb7eba292e913390fa881272bfbc3da0a5380513 (diff)
parent5c2de44417523385010b529599a2b30f290831a3 (diff)
downloadkernel_samsung_smdk4412-1222de7c415cfa70f441f836588fd79a3334d4fe.zip
kernel_samsung_smdk4412-1222de7c415cfa70f441f836588fd79a3334d4fe.tar.gz
kernel_samsung_smdk4412-1222de7c415cfa70f441f836588fd79a3334d4fe.tar.bz2
Merge branch 'sh/runtime-pm-misery' into sh-fixes-for-linus
Diffstat (limited to 'drivers/dma')
-rw-r--r--drivers/dma/shdma.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/dma/shdma.c b/drivers/dma/shdma.c
index 636e409..727e76f 100644
--- a/drivers/dma/shdma.c
+++ b/drivers/dma/shdma.c
@@ -1144,6 +1144,8 @@ static int __init sh_dmae_probe(struct platform_device *pdev)
/* platform data */
shdev->pdata = pdata;
+ platform_set_drvdata(pdev, shdev);
+
pm_runtime_enable(&pdev->dev);
pm_runtime_get_sync(&pdev->dev);
@@ -1256,7 +1258,6 @@ static int __init sh_dmae_probe(struct platform_device *pdev)
pm_runtime_put(&pdev->dev);
- platform_set_drvdata(pdev, shdev);
dma_async_device_register(&shdev->common);
return err;
@@ -1278,6 +1279,8 @@ rst_err:
if (dmars)
iounmap(shdev->dmars);
+
+ platform_set_drvdata(pdev, NULL);
emapdmars:
iounmap(shdev->chan_reg);
synchronize_rcu();
@@ -1316,6 +1319,8 @@ static int __exit sh_dmae_remove(struct platform_device *pdev)
iounmap(shdev->dmars);
iounmap(shdev->chan_reg);
+ platform_set_drvdata(pdev, NULL);
+
synchronize_rcu();
kfree(shdev);