summaryrefslogtreecommitdiff
path: root/sound/soc
diff options
context:
space:
mode:
authorYang Yingliang <yangyingliang@huawei.com>2021-06-17 12:38:45 +0800
committerMark Brown <broonie@kernel.org>2021-06-17 13:47:00 +0100
commit2f1776691978dfab30717548ffec0f3fa4ad0981 (patch)
tree7ab8134b19f8f4b67765e902363c1f1dbe1c2758 /sound/soc
parente99d7c69fd4c18e7319f8aab8e252b12130796bf (diff)
ASoC: stm32: i2s: Use devm_platform_get_and_ioremap_resource()
Use devm_platform_get_and_ioremap_resource() to simplify code. Signed-off-by: Yang Yingliang <yangyingliang@huawei.com> Link: https://lore.kernel.org/r/20210617043847.1113092-2-yangyingliang@huawei.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc')
-rw-r--r--sound/soc/stm/stm32_i2s.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/sound/soc/stm/stm32_i2s.c b/sound/soc/stm/stm32_i2s.c
index 7d1672cf78cc..6254bacad6eb 100644
--- a/sound/soc/stm/stm32_i2s.c
+++ b/sound/soc/stm/stm32_i2s.c
@@ -1036,8 +1036,7 @@ static int stm32_i2s_parse_dt(struct platform_device *pdev,
else
return -EINVAL;
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- i2s->base = devm_ioremap_resource(&pdev->dev, res);
+ i2s->base = devm_platform_get_and_ioremap_resource(pdev, 0, &res);
if (IS_ERR(i2s->base))
return PTR_ERR(i2s->base);