Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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@huawei.com>
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Reviewed-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

authored by

YueHaibing and committed by
Herbert Xu
72174473 cf68528f

+1 -3
+1 -3
drivers/crypto/rockchip/rk3288_crypto.c
··· 311 311 312 312 static int rk_crypto_probe(struct platform_device *pdev) 313 313 { 314 - struct resource *res; 315 314 struct device *dev = &pdev->dev; 316 315 struct rk_crypto_info *crypto_info; 317 316 int err = 0; ··· 338 339 339 340 spin_lock_init(&crypto_info->lock); 340 341 341 - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); 342 - crypto_info->reg = devm_ioremap_resource(&pdev->dev, res); 342 + crypto_info->reg = devm_platform_ioremap_resource(pdev, 0); 343 343 if (IS_ERR(crypto_info->reg)) { 344 344 err = PTR_ERR(crypto_info->reg); 345 345 goto err_crypto;