summaryrefslogtreecommitdiffstats
path: root/drivers/crypto/picoxcell_crypto.c
diff options
context:
space:
mode:
authorWolfram Sang <wsa+renesas@sang-engineering.com>2018-04-19 16:05:36 +0200
committerHerbert Xu <herbert@gondor.apana.org.au>2018-04-28 10:09:35 +0200
commit8ce31dca75c40f076c125547491983a037112c21 (patch)
tree9a455c048f28d85ee4723ce964c96467d33718a3 /drivers/crypto/picoxcell_crypto.c
parentcrypto: omap-sham - fix memleak (diff)
downloadlinux-8ce31dca75c40f076c125547491983a037112c21.tar.xz
linux-8ce31dca75c40f076c125547491983a037112c21.zip
crypto: drivers - 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> Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to '')
-rw-r--r--drivers/crypto/picoxcell_crypto.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/crypto/picoxcell_crypto.c b/drivers/crypto/picoxcell_crypto.c
index a4df966adbf6..321d5e2ac833 100644
--- a/drivers/crypto/picoxcell_crypto.c
+++ b/drivers/crypto/picoxcell_crypto.c
@@ -1169,8 +1169,7 @@ static void spacc_spacc_complete(unsigned long data)
#ifdef CONFIG_PM
static int spacc_suspend(struct device *dev)
{
- struct platform_device *pdev = to_platform_device(dev);
- struct spacc_engine *engine = platform_get_drvdata(pdev);
+ struct spacc_engine *engine = dev_get_drvdata(dev);
/*
* We only support standby mode. All we have to do is gate the clock to
@@ -1184,8 +1183,7 @@ static int spacc_suspend(struct device *dev)
static int spacc_resume(struct device *dev)
{
- struct platform_device *pdev = to_platform_device(dev);
- struct spacc_engine *engine = platform_get_drvdata(pdev);
+ struct spacc_engine *engine = dev_get_drvdata(dev);
return clk_enable(engine->clk);
}