Skip to content

Commit

Permalink
net: emaclite: Convert to use devm_ioremap_resource
Browse files Browse the repository at this point in the history
Commit 7509657 ("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>
  • Loading branch information
Tushar Behera authored and David S. Miller committed Jun 12, 2013
1 parent 941e173 commit eed5d29
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions drivers/net/ethernet/xilinx/xilinx_emaclite.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit eed5d29

Please sign in to comment.