crypto: marvell/cesa - use devm_platform_ioremap_resource_byname
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> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
This commit is contained in:
parent
3ebbc035c0
commit
3cea6b36a4
|
@ -437,7 +437,6 @@ static int mv_cesa_probe(struct platform_device *pdev)
|
||||||
struct device *dev = &pdev->dev;
|
struct device *dev = &pdev->dev;
|
||||||
struct mv_cesa_dev *cesa;
|
struct mv_cesa_dev *cesa;
|
||||||
struct mv_cesa_engine *engines;
|
struct mv_cesa_engine *engines;
|
||||||
struct resource *res;
|
|
||||||
int irq, ret, i, cpu;
|
int irq, ret, i, cpu;
|
||||||
u32 sram_size;
|
u32 sram_size;
|
||||||
|
|
||||||
|
@ -475,8 +474,7 @@ static int mv_cesa_probe(struct platform_device *pdev)
|
||||||
|
|
||||||
spin_lock_init(&cesa->lock);
|
spin_lock_init(&cesa->lock);
|
||||||
|
|
||||||
res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "regs");
|
cesa->regs = devm_platform_ioremap_resource_byname(pdev, "regs");
|
||||||
cesa->regs = devm_ioremap_resource(dev, res);
|
|
||||||
if (IS_ERR(cesa->regs))
|
if (IS_ERR(cesa->regs))
|
||||||
return PTR_ERR(cesa->regs);
|
return PTR_ERR(cesa->regs);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue