[PATCH 08/15] net: emaclite: Convert to use devm_ioremap_resource
From: Tushar Behera
Date: Mon Jun 10 2013 - 07:52:36 EST
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@xxxxxxxxxx>
CC: netdev@xxxxxxxxxxxxxxx
CC: "David S. Miller" <davem@xxxxxxxxxxxxx>
CC: Michal Simek <michal.simek@xxxxxxxxxx>
---
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 majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/