Commit c8b04f00 authored by Yangtao Li's avatar Yangtao Li Committed by Mark Brown

ASoC: ti: Convert to devm_platform_ioremap_resource_byname()

Use devm_platform_ioremap_resource_byname() to simplify code.
Signed-off-by: default avatarYangtao Li <frank.li@vivo.com>
Link: https://lore.kernel.org/r/20230711034846.69437-2-frank.li@vivo.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent 7562539e
...@@ -488,12 +488,10 @@ static int asoc_dmic_probe(struct platform_device *pdev) ...@@ -488,12 +488,10 @@ static int asoc_dmic_probe(struct platform_device *pdev)
dmic->dma_data.filter_data = "up_link"; dmic->dma_data.filter_data = "up_link";
res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "mpu"); dmic->io_base = devm_platform_ioremap_resource_byname(pdev, "mpu");
dmic->io_base = devm_ioremap_resource(&pdev->dev, res);
if (IS_ERR(dmic->io_base)) if (IS_ERR(dmic->io_base))
return PTR_ERR(dmic->io_base); return PTR_ERR(dmic->io_base);
ret = devm_snd_soc_register_component(&pdev->dev, ret = devm_snd_soc_register_component(&pdev->dev,
&omap_dmic_component, &omap_dmic_component,
&omap_dmic_dai, 1); &omap_dmic_dai, 1);
......
...@@ -563,8 +563,7 @@ static int asoc_mcpdm_probe(struct platform_device *pdev) ...@@ -563,8 +563,7 @@ static int asoc_mcpdm_probe(struct platform_device *pdev)
mcpdm->dma_data[0].filter_data = "dn_link"; mcpdm->dma_data[0].filter_data = "dn_link";
mcpdm->dma_data[1].filter_data = "up_link"; mcpdm->dma_data[1].filter_data = "up_link";
res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "mpu"); mcpdm->io_base = devm_platform_ioremap_resource_byname(pdev, "mpu");
mcpdm->io_base = devm_ioremap_resource(&pdev->dev, res);
if (IS_ERR(mcpdm->io_base)) if (IS_ERR(mcpdm->io_base))
return PTR_ERR(mcpdm->io_base); return PTR_ERR(mcpdm->io_base);
......
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