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.beh...@linaro.org>
CC: net...@vger.kernel.org
CC: "David S. Miller" <da...@davemloft.net>
CC: Michal Simek <michal.si...@xilinx.com>
---
 drivers/net/ethernet/xilinx/xilinx_emaclite.c |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/xilinx/xilinx_emaclite.c 
b/drivers/net/ethernet/xilinx/xilinx_emaclite.c
index 1cd131b..fd4dbda 100644
--- a/drivers/net/ethernet/xilinx/xilinx_emaclite.c
+++ b/drivers/net/ethernet/xilinx/xilinx_emaclite.c
@@ -1159,9 +1159,11 @@ static int xemaclite_of_probe(struct platform_device 
*ofdev)
        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;
-- 
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to