summaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorYang Yingliang <yangyingliang@huawei.com>2021-06-15 17:15:01 +0300
committerMark Brown <broonie@kernel.org>2021-06-16 17:41:11 +0300
commitdb4d6d2e6472a5a49801bb5f2c1bd96ed6ffa3d1 (patch)
tree29d929a4d9beae4ceca138fe734d9f2d8f0ac31e /sound
parent4ffbcd4ab0b6f77d29acde69dc25bd95318fae5e (diff)
downloadlinux-db4d6d2e6472a5a49801bb5f2c1bd96ed6ffa3d1.tar.xz
ASoC: rockchip: pdm: 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/20210615141502.1683686-2-yangyingliang@huawei.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/rockchip/rockchip_pdm.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/sound/soc/rockchip/rockchip_pdm.c b/sound/soc/rockchip/rockchip_pdm.c
index 9295d648624e..38bd603eeb45 100644
--- a/sound/soc/rockchip/rockchip_pdm.c
+++ b/sound/soc/rockchip/rockchip_pdm.c
@@ -495,8 +495,7 @@ static int rockchip_pdm_probe(struct platform_device *pdev)
return PTR_ERR(pdm->reset);
}
- 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);