Skip to content

Commit

Permalink
net: bcmgenet: Use devm_ioremap_resource()
Browse files Browse the repository at this point in the history
According to Documentation/driver-model/devres.txt, devm_request_and_ioremap()
is deprecated, so use devm_ioremap_resource() instead.

Signed-off-by: Fabio Estevam <[email protected]>
Acked-by: Florian Fainelli <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
Fabio Estevam authored and davem330 committed Feb 25, 2014
1 parent 0409114 commit 5343a10
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions drivers/net/ethernet/broadcom/genet/bcmgenet.c
Original file line number Diff line number Diff line change
Expand Up @@ -2481,10 +2481,9 @@ static int bcmgenet_probe(struct platform_device *pdev)
}

r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
priv->base = devm_request_and_ioremap(&pdev->dev, r);
if (!priv->base) {
dev_err(&pdev->dev, "can't ioremap\n");
err = -EINVAL;
priv->base = devm_ioremap_resource(&pdev->dev, r);
if (IS_ERR(priv->base)) {
err = PTR_ERR(priv->base);
goto err;
}

Expand Down

0 comments on commit 5343a10

Please sign in to comment.