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

crypto: artpec6 - 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>

authored by

YueHaibing and committed by
Herbert Xu
0866ba23 74bf81d0

+1 -3
+1 -3
drivers/crypto/axis/artpec6_crypto.c
··· 2854 2854 struct artpec6_crypto *ac; 2855 2855 struct device *dev = &pdev->dev; 2856 2856 void __iomem *base; 2857 - struct resource *res; 2858 2857 int irq; 2859 2858 int err; 2860 2859 ··· 2866 2867 2867 2868 variant = (enum artpec6_crypto_variant)match->data; 2868 2869 2869 - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); 2870 - base = devm_ioremap_resource(&pdev->dev, res); 2870 + base = devm_platform_ioremap_resource(pdev, 0); 2871 2871 if (IS_ERR(base)) 2872 2872 return PTR_ERR(base); 2873 2873