summaryrefslogtreecommitdiff
path: root/sound/soc/sunxi
diff options
context:
space:
mode:
authorYang Yingliang <yangyingliang@huawei.com>2021-06-17 07:50:11 +0300
committerMark Brown <broonie@kernel.org>2021-06-21 15:04:17 +0300
commitcc384f05c05618dfcf1990054c1f40bedbb01cca (patch)
tree587399393e50c8304b19f2c3317dc3b26ad1eeea /sound/soc/sunxi
parent37c617f1cf062b56141a06e2ae355e3ecc8b8451 (diff)
downloadlinux-cc384f05c05618dfcf1990054c1f40bedbb01cca.tar.xz
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')
-rw-r--r--sound/soc/sunxi/sun4i-i2s.c3
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);