]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
dmaengine: tegra-apb: Use dev_get_drvdata()
authorJon Hunter <jonathanh@nvidia.com>
Fri, 13 Nov 2015 16:39:39 +0000 (16:39 +0000)
committerVinod Koul <vinod.koul@intel.com>
Sat, 5 Dec 2015 10:43:08 +0000 (16:13 +0530)
In the tegra_dma_runtime_suspend/resume functions, the pdev structure
is not needed, and so just call dev_get_drvdata() to get the device
data structure.

Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
drivers/dma/tegra20-apb-dma.c

index f68bccf55a24081a7937b70f0370be63d2d77b24..355dbc354818b27f0574ecf1e9819cbd36d4753e 100644 (file)
@@ -1509,8 +1509,7 @@ static int tegra_dma_remove(struct platform_device *pdev)
 
 static int tegra_dma_runtime_suspend(struct device *dev)
 {
-       struct platform_device *pdev = to_platform_device(dev);
-       struct tegra_dma *tdma = platform_get_drvdata(pdev);
+       struct tegra_dma *tdma = dev_get_drvdata(dev);
 
        clk_disable_unprepare(tdma->dma_clk);
        return 0;
@@ -1518,8 +1517,7 @@ static int tegra_dma_runtime_suspend(struct device *dev)
 
 static int tegra_dma_runtime_resume(struct device *dev)
 {
-       struct platform_device *pdev = to_platform_device(dev);
-       struct tegra_dma *tdma = platform_get_drvdata(pdev);
+       struct tegra_dma *tdma = dev_get_drvdata(dev);
        int ret;
 
        ret = clk_prepare_enable(tdma->dma_clk);