Message ID | 20200917074234.114623-1-zhangqilong3@huawei.com (mailing list archive) |
---|---|
State | Accepted |
Delegated to: | Herbert Xu |
Headers | show |
Series | [-next] crypto: marvell/cesa - use devm_platform_ioremap_resource_byname | expand |
On Thu, Sep 17, 2020 at 03:42:34PM +0800, Qilong Zhang wrote: > From: Zhang Qilong <zhangqilong3@huawei.com> > > Use the devm_platform_ioremap_resource_byname() helper instead of > calling platform_get_resource_byname() and devm_ioremap_resource() > separately. > > Signed-off-by: Zhang Qilong <zhangqilong3@huawei.com> > --- > drivers/crypto/marvell/cesa/cesa.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) Patch applied. Thanks.
diff --git a/drivers/crypto/marvell/cesa/cesa.c b/drivers/crypto/marvell/cesa/cesa.c index d63bca9718dc..06211858bf2e 100644 --- a/drivers/crypto/marvell/cesa/cesa.c +++ b/drivers/crypto/marvell/cesa/cesa.c @@ -437,7 +437,6 @@ static int mv_cesa_probe(struct platform_device *pdev) struct device *dev = &pdev->dev; struct mv_cesa_dev *cesa; struct mv_cesa_engine *engines; - struct resource *res; int irq, ret, i, cpu; u32 sram_size; @@ -475,8 +474,7 @@ static int mv_cesa_probe(struct platform_device *pdev) spin_lock_init(&cesa->lock); - res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "regs"); - cesa->regs = devm_ioremap_resource(dev, res); + cesa->regs = devm_platform_ioremap_resource_byname(pdev, "regs"); if (IS_ERR(cesa->regs)) return PTR_ERR(cesa->regs);