net: emaclite: Convert to use devm_ioremap_resource
authorTushar Behera <tushar.behera@linaro.org>
Mon, 10 Jun 2013 11:35:06 +0000 (17:05 +0530)
committerDavid S. Miller <davem@davemloft.net>
Wed, 12 Jun 2013 09:22:35 +0000 (02:22 -0700)
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>
drivers/net/ethernet/xilinx/xilinx_emaclite.c

index 1cd131bde680bea02152fa14146bda981d3dd0e5..fd4dbdae5331a3cf31732d9691a1356b7d1abf1c 100644 (file)
@@ -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;