From: Yangtao Li <frank.li@vivo.com>
To: Peter Ujfalusi <peter.ujfalusi@gmail.com>,
Jarkko Nikula <jarkko.nikula@bitmer.com>,
Liam Girdwood <lgirdwood@gmail.com>,
Mark Brown <broonie@kernel.org>, Jaroslav Kysela <perex@perex.cz>,
Takashi Iwai <tiwai@suse.com>
Cc: Yangtao Li <frank.li@vivo.com>,
alsa-devel@alsa-project.org, linux-omap@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: [PATCH 2/5] ASoC: ti: Convert to devm_platform_ioremap_resource_byname()
Date: Tue, 11 Jul 2023 11:48:42 +0800 [thread overview]
Message-ID: <20230711034846.69437-2-frank.li@vivo.com> (raw)
In-Reply-To: <20230711034846.69437-1-frank.li@vivo.com>
Use devm_platform_ioremap_resource_byname() to simplify code.
Signed-off-by: Yangtao Li <frank.li@vivo.com>
---
sound/soc/ti/omap-dmic.c | 4 +---
sound/soc/ti/omap-mcpdm.c | 3 +--
2 files changed, 2 insertions(+), 5 deletions(-)
diff --git a/sound/soc/ti/omap-dmic.c b/sound/soc/ti/omap-dmic.c
index 825c70a443da..cb60af36dbc3 100644
--- a/sound/soc/ti/omap-dmic.c
+++ b/sound/soc/ti/omap-dmic.c
@@ -488,12 +488,10 @@ static int asoc_dmic_probe(struct platform_device *pdev)
dmic->dma_data.filter_data = "up_link";
- res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "mpu");
- dmic->io_base = devm_ioremap_resource(&pdev->dev, res);
+ dmic->io_base = devm_platform_ioremap_resource_byname(pdev, "mpu");
if (IS_ERR(dmic->io_base))
return PTR_ERR(dmic->io_base);
-
ret = devm_snd_soc_register_component(&pdev->dev,
&omap_dmic_component,
&omap_dmic_dai, 1);
diff --git a/sound/soc/ti/omap-mcpdm.c b/sound/soc/ti/omap-mcpdm.c
index 0b18a7bfd3fd..35deceb73427 100644
--- a/sound/soc/ti/omap-mcpdm.c
+++ b/sound/soc/ti/omap-mcpdm.c
@@ -563,8 +563,7 @@ static int asoc_mcpdm_probe(struct platform_device *pdev)
mcpdm->dma_data[0].filter_data = "dn_link";
mcpdm->dma_data[1].filter_data = "up_link";
- res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "mpu");
- mcpdm->io_base = devm_ioremap_resource(&pdev->dev, res);
+ mcpdm->io_base = devm_platform_ioremap_resource_byname(pdev, "mpu");
if (IS_ERR(mcpdm->io_base))
return PTR_ERR(mcpdm->io_base);
--
2.39.0
next prev parent reply other threads:[~2023-07-11 14:23 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-11 3:48 [PATCH 1/5] ASoC: bcm: bcm63xx-i2s-whistler: Convert to devm_platform_ioremap_resource() Yangtao Li
2023-07-11 3:48 ` Yangtao Li [this message]
2023-07-11 3:48 ` [PATCH 3/5] ASoC: mediatek: mt8186: " Yangtao Li
2023-07-11 3:48 ` [PATCH 4/5] ASoC: pxa: Use devm_platform_get_and_ioremap_resource() Yangtao Li
2023-07-11 3:48 ` [PATCH 5/5] ASoC: tegra: tegra20_ac97: " Yangtao Li
2023-07-11 15:46 ` Thierry Reding
2023-07-17 21:59 ` [PATCH 1/5] ASoC: bcm: bcm63xx-i2s-whistler: Convert to devm_platform_ioremap_resource() Mark Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230711034846.69437-2-frank.li@vivo.com \
--to=frank.li@vivo.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=jarkko.nikula@bitmer.com \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=perex@perex.cz \
--cc=peter.ujfalusi@gmail.com \
--cc=tiwai@suse.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox