summaryrefslogtreecommitdiffstats
path: root/sound/soc/mediatek
diff options
context:
space:
mode:
authorCai Huoqing <caihuoqing@baidu.com>2021-09-01 21:27:41 +0800
committerMark Brown <broonie@kernel.org>2021-09-13 01:59:05 +0100
commitc6b1b57469b4768b83e9ccc9bc3e5c2c7eb93013 (patch)
tree8cc273ce7f348babbcc8bd248d6a96c15aa1db65 /sound/soc/mediatek
parent8facf84bcf575e3217a15cefcc867db15dca4781 (diff)
downloadlinux-stable-c6b1b57469b4768b83e9ccc9bc3e5c2c7eb93013.tar.gz
linux-stable-c6b1b57469b4768b83e9ccc9bc3e5c2c7eb93013.tar.bz2
linux-stable-c6b1b57469b4768b83e9ccc9bc3e5c2c7eb93013.zip
ASoC: mediatek: mt8195: Make use of the helper function devm_platform_ioremap_resource()
Use the devm_platform_ioremap_resource() helper instead of calling platform_get_resource() and devm_ioremap_resource() separately Signed-off-by: Cai Huoqing <caihuoqing@baidu.com> Link: https://lore.kernel.org/r/20210901132742.31714-1-caihuoqing@baidu.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/mediatek')
-rw-r--r--sound/soc/mediatek/mt8195/mt8195-afe-pcm.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/sound/soc/mediatek/mt8195/mt8195-afe-pcm.c b/sound/soc/mediatek/mt8195/mt8195-afe-pcm.c
index 6635c3f72ecc..8c697f41d51d 100644
--- a/sound/soc/mediatek/mt8195/mt8195-afe-pcm.c
+++ b/sound/soc/mediatek/mt8195/mt8195-afe-pcm.c
@@ -3057,7 +3057,6 @@ static int mt8195_afe_pcm_dev_probe(struct platform_device *pdev)
{
struct mtk_base_afe *afe;
struct mt8195_afe_private *afe_priv;
- struct resource *res;
struct device *dev = &pdev->dev;
int i, irq_id, ret;
struct snd_soc_component *component;
@@ -3078,8 +3077,7 @@ static int mt8195_afe_pcm_dev_probe(struct platform_device *pdev)
afe_priv = afe->platform_priv;
afe->dev = &pdev->dev;
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- afe->base_addr = devm_ioremap_resource(&pdev->dev, res);
+ afe->base_addr = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(afe->base_addr))
return PTR_ERR(afe->base_addr);