Skip to content

Commit eed5d29

Browse files
trbeheradavem330
authored andcommitted
net: emaclite: Convert to use devm_ioremap_resource
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 <[email protected]> CC: [email protected] CC: "David S. Miller" <[email protected]> CC: Michal Simek <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 941e173 commit eed5d29

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

drivers/net/ethernet/xilinx/xilinx_emaclite.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1159,9 +1159,11 @@ static int xemaclite_of_probe(struct platform_device *ofdev)
11591159
ndev->irq = res->start;
11601160

11611161
res = platform_get_resource(ofdev, IORESOURCE_MEM, 0);
1162-
lp->base_addr = devm_request_and_ioremap(&ofdev->dev, res);
1163-
if (!lp->base_addr)
1162+
lp->base_addr = devm_ioremap_resource(&ofdev->dev, res);
1163+
if (IS_ERR(lp->base_addr)) {
1164+
rc = PTR_ERR(lp->base_addr);
11641165
goto error;
1166+
}
11651167

11661168
ndev->mem_start = res->start;
11671169
ndev->mem_end = res->end;

0 commit comments

Comments
 (0)