Commit
75096579c3ac ("lib: devres: Introduce devm_ioremap_resource()")
introduced devm_ioremap_resource() and deprecated the use of
devm_request_and_ioremap().
Signed-off-by: Tushar Behera <tushar.behera@linaro.org>
CC: netdev@vger.kernel.org
CC: "David S. Miller" <davem@davemloft.net>
CC: Michal Simek <michal.simek@xilinx.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
ndev->irq = res->start;
res = platform_get_resource(ofdev, IORESOURCE_MEM, 0);
- lp->base_addr = devm_request_and_ioremap(&ofdev->dev, res);
- if (!lp->base_addr)
+ lp->base_addr = devm_ioremap_resource(&ofdev->dev, res);
+ if (IS_ERR(lp->base_addr)) {
+ rc = PTR_ERR(lp->base_addr);
goto error;
+ }
ndev->mem_start = res->start;
ndev->mem_end = res->end;