Commit 4cb9d648 authored by Mark Brown's avatar Mark Brown

Merge series "ASoC: stm32: Use devm_platform_get_and_ioremap_resource()" from...

Merge series "ASoC: stm32: Use devm_platform_get_and_ioremap_resource()" from Yang Yingliang <yangyingliang@huawei.com>:

Use devm_platform_get_and_ioremap_resource() to simplify
code.

Yang Yingliang (3):
  ASoC: stm32: i2s: Use devm_platform_get_and_ioremap_resource()
  ASoC: stm32: sai: Use devm_platform_get_and_ioremap_resource()
  ASoC: stm32: spdifrx: Use devm_platform_get_and_ioremap_resource()

 sound/soc/stm/stm32_i2s.c     | 3 +--
 sound/soc/stm/stm32_sai_sub.c | 3 +--
 sound/soc/stm/stm32_spdifrx.c | 3 +--
 3 files changed, 3 insertions(+), 6 deletions(-)

--
2.25.1
parents 114bacc7 f3babad4
...@@ -1036,8 +1036,7 @@ static int stm32_i2s_parse_dt(struct platform_device *pdev, ...@@ -1036,8 +1036,7 @@ static int stm32_i2s_parse_dt(struct platform_device *pdev,
else else
return -EINVAL; return -EINVAL;
res = platform_get_resource(pdev, IORESOURCE_MEM, 0); i2s->base = devm_platform_get_and_ioremap_resource(pdev, 0, &res);
i2s->base = devm_ioremap_resource(&pdev->dev, res);
if (IS_ERR(i2s->base)) if (IS_ERR(i2s->base))
return PTR_ERR(i2s->base); return PTR_ERR(i2s->base);
......
...@@ -1361,8 +1361,7 @@ static int stm32_sai_sub_parse_of(struct platform_device *pdev, ...@@ -1361,8 +1361,7 @@ static int stm32_sai_sub_parse_of(struct platform_device *pdev,
if (!np) if (!np)
return -ENODEV; return -ENODEV;
res = platform_get_resource(pdev, IORESOURCE_MEM, 0); base = devm_platform_get_and_ioremap_resource(pdev, 0, &res);
base = devm_ioremap_resource(&pdev->dev, res);
if (IS_ERR(base)) if (IS_ERR(base))
return PTR_ERR(base); return PTR_ERR(base);
......
...@@ -922,8 +922,7 @@ static int stm32_spdifrx_parse_of(struct platform_device *pdev, ...@@ -922,8 +922,7 @@ static int stm32_spdifrx_parse_of(struct platform_device *pdev,
else else
return -EINVAL; return -EINVAL;
res = platform_get_resource(pdev, IORESOURCE_MEM, 0); spdifrx->base = devm_platform_get_and_ioremap_resource(pdev, 0, &res);
spdifrx->base = devm_ioremap_resource(&pdev->dev, res);
if (IS_ERR(spdifrx->base)) if (IS_ERR(spdifrx->base))
return PTR_ERR(spdifrx->base); return PTR_ERR(spdifrx->base);
......
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