mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-15 09:34:17 +00:00
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>
This commit is contained in:
parent
941e173a53
commit
eed5d29d78
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user