Commit c6b1b574 authored by Cai Huoqing's avatar Cai Huoqing Committed by Mark Brown

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: default avatarCai Huoqing <caihuoqing@baidu.com>
Link: https://lore.kernel.org/r/20210901132742.31714-1-caihuoqing@baidu.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent 8facf84b
...@@ -3057,7 +3057,6 @@ static int mt8195_afe_pcm_dev_probe(struct platform_device *pdev) ...@@ -3057,7 +3057,6 @@ static int mt8195_afe_pcm_dev_probe(struct platform_device *pdev)
{ {
struct mtk_base_afe *afe; struct mtk_base_afe *afe;
struct mt8195_afe_private *afe_priv; struct mt8195_afe_private *afe_priv;
struct resource *res;
struct device *dev = &pdev->dev; struct device *dev = &pdev->dev;
int i, irq_id, ret; int i, irq_id, ret;
struct snd_soc_component *component; struct snd_soc_component *component;
...@@ -3078,8 +3077,7 @@ static int mt8195_afe_pcm_dev_probe(struct platform_device *pdev) ...@@ -3078,8 +3077,7 @@ static int mt8195_afe_pcm_dev_probe(struct platform_device *pdev)
afe_priv = afe->platform_priv; afe_priv = afe->platform_priv;
afe->dev = &pdev->dev; afe->dev = &pdev->dev;
res = platform_get_resource(pdev, IORESOURCE_MEM, 0); afe->base_addr = devm_platform_ioremap_resource(pdev, 0);
afe->base_addr = devm_ioremap_resource(&pdev->dev, res);
if (IS_ERR(afe->base_addr)) if (IS_ERR(afe->base_addr))
return PTR_ERR(afe->base_addr); return PTR_ERR(afe->base_addr);
......
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