提交 5343a10d 编写于 作者: F Fabio Estevam 提交者: 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: NFabio Estevam <fabio.estevam@freescale.com>
Acked-by: NFlorian Fainelli <f.fainelli@gmail.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 04091142
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册