diff options
author | Mark Brown <broonie@kernel.org> | 2021-06-21 19:16:51 +0100 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2021-06-21 19:16:51 +0100 |
commit | b4fd4ea7b628abbc721a0c6ddbb3fb3e454b2c62 (patch) | |
tree | df545a39dacde12f8aa662bd68d5675431f7c29e /sound | |
parent | ea837090b388245744988083313f6e9c7c9b9699 (diff) | |
parent | b73cbd7b1c2d477d143c544bdc2b3415bae58a14 (diff) |
Merge series "ASoC: samsung: 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 (4):
ASoC: samsung: i2s: Use devm_platform_get_and_ioremap_resource()
ASoC: samsung: pcm: Use devm_platform_get_and_ioremap_resource()
ASoC: samsung: s3c2412-i2s: Use
devm_platform_get_and_ioremap_resource()
ASoC: samsung: s3c24xx-i2s: Use
devm_platform_get_and_ioremap_resource()
sound/soc/samsung/i2s.c | 3 +--
sound/soc/samsung/pcm.c | 3 +--
sound/soc/samsung/s3c2412-i2s.c | 3 +--
sound/soc/samsung/s3c24xx-i2s.c | 3 +--
4 files changed, 4 insertions(+), 8 deletions(-)
--
2.25.1
Diffstat (limited to 'sound')
-rw-r--r-- | sound/soc/samsung/i2s.c | 3 | ||||
-rw-r--r-- | sound/soc/samsung/pcm.c | 3 | ||||
-rw-r--r-- | sound/soc/samsung/s3c2412-i2s.c | 3 | ||||
-rw-r--r-- | sound/soc/samsung/s3c24xx-i2s.c | 3 |
4 files changed, 4 insertions, 8 deletions
diff --git a/sound/soc/samsung/i2s.c b/sound/soc/samsung/i2s.c index c632842d42eb..309badc97290 100644 --- a/sound/soc/samsung/i2s.c +++ b/sound/soc/samsung/i2s.c @@ -1441,8 +1441,7 @@ static int samsung_i2s_probe(struct platform_device *pdev) } } - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - priv->addr = devm_ioremap_resource(&pdev->dev, res); + priv->addr = devm_platform_get_and_ioremap_resource(pdev, 0, &res); if (IS_ERR(priv->addr)) return PTR_ERR(priv->addr); diff --git a/sound/soc/samsung/pcm.c b/sound/soc/samsung/pcm.c index bfd76e9cc0ca..4c4dfde0568f 100644 --- a/sound/soc/samsung/pcm.c +++ b/sound/soc/samsung/pcm.c @@ -512,8 +512,7 @@ static int s3c_pcm_dev_probe(struct platform_device *pdev) /* Default is 128fs */ pcm->sclk_per_fs = 128; - mem_res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - pcm->regs = devm_ioremap_resource(&pdev->dev, mem_res); + pcm->regs = devm_platform_get_and_ioremap_resource(pdev, 0, &mem_res); if (IS_ERR(pcm->regs)) return PTR_ERR(pcm->regs); diff --git a/sound/soc/samsung/s3c2412-i2s.c b/sound/soc/samsung/s3c2412-i2s.c index 81f416ac457e..ec1c6f9d76ac 100644 --- a/sound/soc/samsung/s3c2412-i2s.c +++ b/sound/soc/samsung/s3c2412-i2s.c @@ -208,8 +208,7 @@ static int s3c2412_iis_dev_probe(struct platform_device *pdev) return -ENXIO; } - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - s3c2412_i2s.regs = devm_ioremap_resource(&pdev->dev, res); + s3c2412_i2s.regs = devm_platform_get_and_ioremap_resource(pdev, 0, &res); if (IS_ERR(s3c2412_i2s.regs)) return PTR_ERR(s3c2412_i2s.regs); diff --git a/sound/soc/samsung/s3c24xx-i2s.c b/sound/soc/samsung/s3c24xx-i2s.c index 50c08008aacb..0f46304eaa4f 100644 --- a/sound/soc/samsung/s3c24xx-i2s.c +++ b/sound/soc/samsung/s3c24xx-i2s.c @@ -425,8 +425,7 @@ static int s3c24xx_iis_dev_probe(struct platform_device *pdev) struct resource *res; int ret; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - s3c24xx_i2s.regs = devm_ioremap_resource(&pdev->dev, res); + s3c24xx_i2s.regs = devm_platform_get_and_ioremap_resource(pdev, 0, &res); if (IS_ERR(s3c24xx_i2s.regs)) return PTR_ERR(s3c24xx_i2s.regs); |