aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMinghao Chi <[email protected]>2022-11-11 16:41:51 +0800
committerMark Brown <[email protected]>2022-11-14 11:30:31 +0000
commitf8fd5f4813b6d8bdd003ffe164e98bfa01b1c830 (patch)
treef02f3a99445ef4ec3267e2220877c5fcde81dbe8
parentec7bf231aaa1bdbcb69d23bc50c753c80fb22429 (diff)
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: Zeal Robot <[email protected]> Signed-off-by: Minghao Chi <[email protected]> Acked-by: Samuel Holland <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
-rw-r--r--sound/soc/sunxi/sun50i-dmic.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/sound/soc/sunxi/sun50i-dmic.c b/sound/soc/sunxi/sun50i-dmic.c
index 62509cb02995..069c993acb31 100644
--- a/sound/soc/sunxi/sun50i-dmic.c
+++ b/sound/soc/sunxi/sun50i-dmic.c
@@ -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");