diff options
author | YueHaibing <yuehaibing@huawei.com> | 2019-08-02 21:28:03 +0800 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2019-08-09 15:12:00 +1000 |
commit | b26120fdb9326052cc0bffe6a52c19a7145d3851 (patch) | |
tree | a66ac1f5163f0991a923a8bf30e5494ed1e42197 /drivers/crypto/mediatek | |
parent | f8dab5575b76ea01b300e4b3a145955763ed61a9 (diff) | |
download | linux-rt-b26120fdb9326052cc0bffe6a52c19a7145d3851.tar.gz |
crypto: mediatek - use devm_platform_ioremap_resource() to simplify code
Use devm_platform_ioremap_resource() to simplify the code a bit.
This is detected by coccinelle.
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto/mediatek')
-rw-r--r-- | drivers/crypto/mediatek/mtk-platform.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/crypto/mediatek/mtk-platform.c b/drivers/crypto/mediatek/mtk-platform.c index 4f43318ca14b..7e3ad085b5bd 100644 --- a/drivers/crypto/mediatek/mtk-platform.c +++ b/drivers/crypto/mediatek/mtk-platform.c @@ -481,7 +481,6 @@ err_cleanup: static int mtk_crypto_probe(struct platform_device *pdev) { - struct resource *res = platform_get_resource(pdev, IORESOURCE_MEM, 0); struct mtk_cryp *cryp; int i, err; @@ -489,7 +488,7 @@ static int mtk_crypto_probe(struct platform_device *pdev) if (!cryp) return -ENOMEM; - cryp->base = devm_ioremap_resource(&pdev->dev, res); + cryp->base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(cryp->base)) return PTR_ERR(cryp->base); |