Commit b0d76521 authored by Fabio Estevam's avatar Fabio Estevam Committed by Herbert Xu

crypto: sahara - Use devm_platform_ioremap_resource()

Use devm_platform_ioremap_resource() to simplify the code a bit.
Signed-off-by: default avatarFabio Estevam <festevam@gmail.com>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent cec1caaf
...@@ -1387,7 +1387,6 @@ MODULE_DEVICE_TABLE(of, sahara_dt_ids); ...@@ -1387,7 +1387,6 @@ MODULE_DEVICE_TABLE(of, sahara_dt_ids);
static int sahara_probe(struct platform_device *pdev) static int sahara_probe(struct platform_device *pdev)
{ {
struct sahara_dev *dev; struct sahara_dev *dev;
struct resource *res;
u32 version; u32 version;
int irq; int irq;
int err; int err;
...@@ -1401,8 +1400,7 @@ static int sahara_probe(struct platform_device *pdev) ...@@ -1401,8 +1400,7 @@ static int sahara_probe(struct platform_device *pdev)
platform_set_drvdata(pdev, dev); platform_set_drvdata(pdev, dev);
/* Get the base address */ /* Get the base address */
res = platform_get_resource(pdev, IORESOURCE_MEM, 0); dev->regs_base = devm_platform_ioremap_resource(pdev, 0);
dev->regs_base = devm_ioremap_resource(&pdev->dev, res);
if (IS_ERR(dev->regs_base)) if (IS_ERR(dev->regs_base))
return PTR_ERR(dev->regs_base); return PTR_ERR(dev->regs_base);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment