summaryrefslogtreecommitdiffstats
path: root/drivers/dma
diff options
context:
space:
mode:
authorWolfram Sang <wsa+renesas@sang-engineering.com>2018-04-22 11:14:12 +0200
committerVinod Koul <vkoul@kernel.org>2018-04-22 21:37:37 +0530
commitb7d69799af675e1c13ea470ef942450216b2c9b6 (patch)
tree6b567c2a22f40ace8a64941388bc1d8908d33c97 /drivers/dma
parent60cc43fc888428bb2f18f08997432d426a243338 (diff)
downloadop-kernel-dev-b7d69799af675e1c13ea470ef942450216b2c9b6.zip
op-kernel-dev-b7d69799af675e1c13ea470ef942450216b2c9b6.tar.gz
dmaengine: idma64: 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/idma64.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/dma/idma64.c b/drivers/dma/idma64.c
index 1953e57..e5c9112 100644
--- a/drivers/dma/idma64.c
+++ b/drivers/dma/idma64.c
@@ -670,8 +670,7 @@ static int idma64_platform_remove(struct platform_device *pdev)
static int idma64_pm_suspend(struct device *dev)
{
- struct platform_device *pdev = to_platform_device(dev);
- struct idma64_chip *chip = platform_get_drvdata(pdev);
+ struct idma64_chip *chip = dev_get_drvdata(dev);
idma64_off(chip->idma64);
return 0;
@@ -679,8 +678,7 @@ static int idma64_pm_suspend(struct device *dev)
static int idma64_pm_resume(struct device *dev)
{
- struct platform_device *pdev = to_platform_device(dev);
- struct idma64_chip *chip = platform_get_drvdata(pdev);
+ struct idma64_chip *chip = dev_get_drvdata(dev);
idma64_on(chip->idma64);
return 0;
OpenPOWER on IntegriCloud