summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/xilinx
diff options
context:
space:
mode:
authorTushar Behera <tushar.behera@linaro.org>2013-06-10 15:35:06 +0400
committerDavid S. Miller <davem@davemloft.net>2013-06-12 13:22:35 +0400
commiteed5d29d7818cc7a84e60123555cae154e5b4a73 (patch)
tree331145a1b7612d8df38a60b51190c36ebaa301f1 /drivers/net/ethernet/xilinx
parent941e173a538c58f7f60e3f70ab0e35d51563405b (diff)
downloadlinux-eed5d29d7818cc7a84e60123555cae154e5b4a73.tar.xz
net: emaclite: Convert to use devm_ioremap_resource
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>
Diffstat (limited to 'drivers/net/ethernet/xilinx')
-rw-r--r--drivers/net/ethernet/xilinx/xilinx_emaclite.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/net/ethernet/xilinx/xilinx_emaclite.c b/drivers/net/ethernet/xilinx/xilinx_emaclite.c
index 1cd131bde680..fd4dbdae5331 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;