Commit 5343a10d authored by Fabio Estevam's avatar Fabio Estevam Committed by David S. Miller

net: bcmgenet: Use devm_ioremap_resource()

According to Documentation/driver-model/devres.txt, devm_request_and_ioremap()
is deprecated, so use devm_ioremap_resource() instead.
Signed-off-by: default avatarFabio Estevam <fabio.estevam@freescale.com>
Acked-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 04091142
...@@ -2481,10 +2481,9 @@ static int bcmgenet_probe(struct platform_device *pdev) ...@@ -2481,10 +2481,9 @@ static int bcmgenet_probe(struct platform_device *pdev)
} }
r = platform_get_resource(pdev, IORESOURCE_MEM, 0); r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
priv->base = devm_request_and_ioremap(&pdev->dev, r); priv->base = devm_ioremap_resource(&pdev->dev, r);
if (!priv->base) { if (IS_ERR(priv->base)) {
dev_err(&pdev->dev, "can't ioremap\n"); err = PTR_ERR(priv->base);
err = -EINVAL;
goto err; goto err;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment