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

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.cn


Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent ec7bf231
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -317,8 +317,7 @@ static int sun50i_dmic_probe(struct platform_device *pdev)
		return -ENOMEM;

	/* Get the addresses */
	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
	base = devm_ioremap_resource(&pdev->dev, res);
	base = devm_platform_get_and_ioremap_resource(pdev, 0, &res);
	if (IS_ERR(base))
		return dev_err_probe(&pdev->dev, PTR_ERR(base),
				     "get resource failed.\n");