[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190802132809.8116-10-yuehaibing@huawei.com>
Date: Fri, 2 Aug 2019 21:28:06 +0800
From: YueHaibing <yuehaibing@...wei.com>
To: <herbert@...dor.apana.org.au>, <lars.persson@...s.com>,
<jesper.nilsson@...s.com>, <davem@...emloft.net>,
<thomas.lendacky@....com>, <gary.hook@....com>, <krzk@...nel.org>,
<kgene@...nel.org>, <antoine.tenart@...tlin.com>,
<matthias.bgg@...il.com>, <jamie@...ieiles.com>,
<agross@...nel.org>, <heiko@...ech.de>,
<mcoquelin.stm32@...il.com>, <alexandre.torgue@...com>,
<clabbe.montjoie@...il.com>, <mripard@...nel.org>, <wens@...e.org>
CC: <linux-kernel@...r.kernel.org>, <linux-crypto@...r.kernel.org>,
<linux-arm-kernel@...s.com>, <linux-samsung-soc@...r.kernel.org>,
<linux-arm-kernel@...ts.infradead.org>,
<linux-mediatek@...ts.infradead.org>,
<linux-arm-msm@...r.kernel.org>,
<linux-rockchip@...ts.infradead.org>,
<linux-stm32@...md-mailman.stormreply.com>,
YueHaibing <yuehaibing@...wei.com>
Subject: [PATCH -next 09/12] crypto: rockchip - 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@...wei.com>
Signed-off-by: YueHaibing <yuehaibing@...wei.com>
---
drivers/crypto/rockchip/rk3288_crypto.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/crypto/rockchip/rk3288_crypto.c b/drivers/crypto/rockchip/rk3288_crypto.c
index 8d7e254..e5714ef 100644
--- a/drivers/crypto/rockchip/rk3288_crypto.c
+++ b/drivers/crypto/rockchip/rk3288_crypto.c
@@ -311,7 +311,6 @@ MODULE_DEVICE_TABLE(of, crypto_of_id_table);
static int rk_crypto_probe(struct platform_device *pdev)
{
- struct resource *res;
struct device *dev = &pdev->dev;
struct rk_crypto_info *crypto_info;
int err = 0;
@@ -339,8 +338,7 @@ static int rk_crypto_probe(struct platform_device *pdev)
spin_lock_init(&crypto_info->lock);
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- crypto_info->reg = devm_ioremap_resource(&pdev->dev, res);
+ crypto_info->reg = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(crypto_info->reg)) {
err = PTR_ERR(crypto_info->reg);
goto err_crypto;
--
2.7.4
Powered by blists - more mailing lists