diff options
author | Wolfram Sang <wsa+renesas@sang-engineering.com> | 2018-04-22 05:14:14 -0400 |
---|---|---|
committer | Vinod Koul <vkoul@kernel.org> | 2018-04-22 12:08:06 -0400 |
commit | a8afcfeb013f95a3339eafd690f41af6657a6113 (patch) | |
tree | 96e0e9972f7e294063153334357718487a0068a6 | |
parent | 60cc43fc888428bb2f18f08997432d426a243338 (diff) |
dmaengine: txx9dmac: 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/txx9dmac.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/dma/txx9dmac.c b/drivers/dma/txx9dmac.c index 4d8c7b9078fd..eb45af71d3a3 100644 --- a/drivers/dma/txx9dmac.c +++ b/drivers/dma/txx9dmac.c | |||
@@ -1244,8 +1244,7 @@ static void txx9dmac_shutdown(struct platform_device *pdev) | |||
1244 | 1244 | ||
1245 | static int txx9dmac_suspend_noirq(struct device *dev) | 1245 | static int txx9dmac_suspend_noirq(struct device *dev) |
1246 | { | 1246 | { |
1247 | struct platform_device *pdev = to_platform_device(dev); | 1247 | struct txx9dmac_dev *ddev = dev_get_drvdata(dev); |
1248 | struct txx9dmac_dev *ddev = platform_get_drvdata(pdev); | ||
1249 | 1248 | ||
1250 | txx9dmac_off(ddev); | 1249 | txx9dmac_off(ddev); |
1251 | return 0; | 1250 | return 0; |
@@ -1253,9 +1252,8 @@ static int txx9dmac_suspend_noirq(struct device *dev) | |||
1253 | 1252 | ||
1254 | static int txx9dmac_resume_noirq(struct device *dev) | 1253 | static int txx9dmac_resume_noirq(struct device *dev) |
1255 | { | 1254 | { |
1256 | struct platform_device *pdev = to_platform_device(dev); | 1255 | struct txx9dmac_dev *ddev = dev_get_drvdata(dev); |
1257 | struct txx9dmac_dev *ddev = platform_get_drvdata(pdev); | 1256 | struct txx9dmac_platform_data *pdata = dev_get_platdata(dev); |
1258 | struct txx9dmac_platform_data *pdata = dev_get_platdata(&pdev->dev); | ||
1259 | u32 mcr; | 1257 | u32 mcr; |
1260 | 1258 | ||
1261 | mcr = TXX9_DMA_MCR_MSTEN | MCR_LE; | 1259 | mcr = TXX9_DMA_MCR_MSTEN | MCR_LE; |