diff options
author | Wolfram Sang <wsa+renesas@sang-engineering.com> | 2018-04-22 11:14:11 +0200 |
---|---|---|
committer | Vinod Koul <vkoul@kernel.org> | 2018-04-22 21:37:17 +0530 |
commit | 03bf2793f3637f7c3cb7acbe40f15f4da333f2e1 (patch) | |
tree | b46448c9b2340726c22ae8cb880207a34483fb5d /drivers/dma | |
parent | 60cc43fc888428bb2f18f08997432d426a243338 (diff) | |
download | linux-03bf2793f3637f7c3cb7acbe40f15f4da333f2e1.tar.gz linux-03bf2793f3637f7c3cb7acbe40f15f4da333f2e1.tar.bz2 linux-03bf2793f3637f7c3cb7acbe40f15f4da333f2e1.zip |
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>
Diffstat (limited to 'drivers/dma')
-rw-r--r-- | drivers/dma/fsldma.c | 6 |
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) #ifdef CONFIG_PM static int fsldma_suspend_late(struct device *dev) { - struct platform_device *pdev = to_platform_device(dev); - struct fsldma_device *fdev = platform_get_drvdata(pdev); + struct fsldma_device *fdev = dev_get_drvdata(dev); struct fsldma_chan *chan; int i; @@ -1360,8 +1359,7 @@ out: static int fsldma_resume_early(struct device *dev) { - struct platform_device *pdev = to_platform_device(dev); - struct fsldma_device *fdev = platform_get_drvdata(pdev); + struct fsldma_device *fdev = dev_get_drvdata(dev); struct fsldma_chan *chan; u32 mode; int i; |