提交 bc441bc8 编写于 作者: L Laurent Navet 提交者: Marc Kleine-Budde

drivers: net: can: grcan: use devm_ioremap_resource()

Replace a call to deprecated devm_request_and_ioremap by devm_ioremap_resource.
dev_err() message is no more needed since it's already displayed in
devm_ioremap_resource().
Signed-off-by: NLaurent Navet <laurent.navet@gmail.com>
Acked-by: NAndreas Larsson <andreas@gaisler.com>
Signed-off-by: NMarc Kleine-Budde <mkl@pengutronix.de>
上级 dbbffe68
......@@ -1683,10 +1683,9 @@ static int grcan_probe(struct platform_device *ofdev)
}
res = platform_get_resource(ofdev, IORESOURCE_MEM, 0);
base = devm_request_and_ioremap(&ofdev->dev, res);
if (!base) {
dev_err(&ofdev->dev, "couldn't map IO resource\n");
err = -EADDRNOTAVAIL;
base = devm_ioremap_resource(&ofdev->dev, res);
if (IS_ERR(base)) {
err = PTR_ERR(base);
goto exit_error;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册