mirror of https://gitee.com/openkylin/linux.git
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: Fabio Estevam <fabio.estevam@freescale.com> Acked-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
0409114282
commit
5343a10d15
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue