Commit f8fd5f48 authored by Minghao Chi's avatar Minghao Chi Committed by Mark Brown

ASoC: sunxi: use devm_platform_get_and_ioremap_resource()

Convert platform_get_resource(), devm_ioremap_resource() to a single
call to devm_platform_get_and_ioremap_resource(), as this is exactly
what this function does.
Reported-by: default avatarZeal Robot <zealci@zte.com.cn>
Signed-off-by: default avatarMinghao Chi <chi.minghao@zte.com.cn>
Acked-by: default avatarSamuel Holland <samuel@sholland.org>
Link: https://lore.kernel.org/r/202211111641514826535@zte.com.cnSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent ec7bf231
...@@ -317,8 +317,7 @@ static int sun50i_dmic_probe(struct platform_device *pdev) ...@@ -317,8 +317,7 @@ static int sun50i_dmic_probe(struct platform_device *pdev)
return -ENOMEM; return -ENOMEM;
/* Get the addresses */ /* Get the addresses */
res = platform_get_resource(pdev, IORESOURCE_MEM, 0); base = devm_platform_get_and_ioremap_resource(pdev, 0, &res);
base = devm_ioremap_resource(&pdev->dev, res);
if (IS_ERR(base)) if (IS_ERR(base))
return dev_err_probe(&pdev->dev, PTR_ERR(base), return dev_err_probe(&pdev->dev, PTR_ERR(base),
"get resource failed.\n"); "get resource failed.\n");
......
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