diff options
author | Yang Yingliang <yangyingliang@huawei.com> | 2021-06-17 07:38:45 +0300 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2021-06-17 15:47:00 +0300 |
commit | 2f1776691978dfab30717548ffec0f3fa4ad0981 (patch) | |
tree | 7ab8134b19f8f4b67765e902363c1f1dbe1c2758 /sound/soc/stm | |
parent | e99d7c69fd4c18e7319f8aab8e252b12130796bf (diff) | |
download | linux-2f1776691978dfab30717548ffec0f3fa4ad0981.tar.xz |
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/stm')
-rw-r--r-- | sound/soc/stm/stm32_i2s.c | 3 |
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); |