summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWolfram Sang <wsa+renesas@sang-engineering.com>2018-04-22 05:14:11 -0400
committerVinod Koul <vkoul@kernel.org>2018-04-22 12:07:17 -0400
commit03bf2793f3637f7c3cb7acbe40f15f4da333f2e1 (patch)
treeb46448c9b2340726c22ae8cb880207a34483fb5d
parent60cc43fc888428bb2f18f08997432d426a243338 (diff)
dmaengine: fsldma: simplify getting .drvdata
We should get drvdata from struct device directly. Going via platform_device is an unneeded step back and forth. Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Signed-off-by: Vinod Koul <vkoul@kernel.org>
-rw-r--r--drivers/dma/fsldma.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/dma/fsldma.c b/drivers/dma/fsldma.c
index 3eaece888e75..1117b5123a6f 100644
--- a/drivers/dma/fsldma.c
+++ b/drivers/dma/fsldma.c
@@ -1328,8 +1328,7 @@ static int fsldma_of_remove(struct platform_device *op)
1328#ifdef CONFIG_PM 1328#ifdef CONFIG_PM
1329static int fsldma_suspend_late(struct device *dev) 1329static int fsldma_suspend_late(struct device *dev)
1330{ 1330{
1331 struct platform_device *pdev = to_platform_device(dev); 1331 struct fsldma_device *fdev = dev_get_drvdata(dev);
1332 struct fsldma_device *fdev = platform_get_drvdata(pdev);
1333 struct fsldma_chan *chan; 1332 struct fsldma_chan *chan;
1334 int i; 1333 int i;
1335 1334
@@ -1360,8 +1359,7 @@ out:
1360 1359
1361static int fsldma_resume_early(struct device *dev) 1360static int fsldma_resume_early(struct device *dev)
1362{ 1361{
1363 struct platform_device *pdev = to_platform_device(dev); 1362 struct fsldma_device *fdev = dev_get_drvdata(dev);
1364 struct fsldma_device *fdev = platform_get_drvdata(pdev);
1365 struct fsldma_chan *chan; 1363 struct fsldma_chan *chan;
1366 u32 mode; 1364 u32 mode;
1367 int i; 1365 int i;