提交 21b066f1 编写于 作者: L Laurent Navet 提交者: Greg Kroah-Hartman

drivers: misc: use devm_ioremap_resource()

Replace a call to deprecated devm_request_and_ioremap by devm_ioremap_resource.

Found with coccicheck and this semantic patch:
 scripts/coccinelle/api/devm_request_and_ioremap.cocci.
Signed-off-by: NLaurent Navet <laurent.navet@gmail.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 ae8a35ae
......@@ -50,9 +50,10 @@ static int sram_probe(struct platform_device *pdev)
size = resource_size(res);
virt_base = devm_request_and_ioremap(&pdev->dev, res);
if (!virt_base)
return -EADDRNOTAVAIL;
virt_base = devm_ioremap_resource(&pdev->dev, res);
if (IS_ERR(virt_base))
return PTR_ERR(virt_base);
sram = devm_kzalloc(&pdev->dev, sizeof(*sram), GFP_KERNEL);
if (!sram)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册