diff options
author | Yang Yingliang <yangyingliang@huawei.com> | 2021-06-17 12:50:11 +0800 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2021-06-21 13:04:17 +0100 |
commit | cc384f05c05618dfcf1990054c1f40bedbb01cca (patch) | |
tree | 587399393e50c8304b19f2c3317dc3b26ad1eeea /sound/soc/sunxi/sun4i-i2s.c | |
parent | 37c617f1cf062b56141a06e2ae355e3ecc8b8451 (diff) | |
download | lwn-cc384f05c05618dfcf1990054c1f40bedbb01cca.tar.gz lwn-cc384f05c05618dfcf1990054c1f40bedbb01cca.zip |
ASoC: sun4i-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/20210617045012.1119650-3-yangyingliang@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/sunxi/sun4i-i2s.c')
-rw-r--r-- | sound/soc/sunxi/sun4i-i2s.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/sound/soc/sunxi/sun4i-i2s.c b/sound/soc/sunxi/sun4i-i2s.c index c57feae3396e..1e9116cd365e 100644 --- a/sound/soc/sunxi/sun4i-i2s.c +++ b/sound/soc/sunxi/sun4i-i2s.c @@ -1470,8 +1470,7 @@ static int sun4i_i2s_probe(struct platform_device *pdev) return -ENOMEM; platform_set_drvdata(pdev, i2s); - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - regs = devm_ioremap_resource(&pdev->dev, res); + regs = devm_platform_get_and_ioremap_resource(pdev, 0, &res); if (IS_ERR(regs)) return PTR_ERR(regs); |