summaryrefslogtreecommitdiff
path: root/sound/soc/rockchip
diff options
context:
space:
mode:
authorYang Yingliang <yangyingliang@huawei.com>2021-06-15 22:15:02 +0800
committerMark Brown <broonie@kernel.org>2021-06-16 15:41:12 +0100
commit3325b1515a92fc07ec16b4d33c8bccc0a83f12ca (patch)
tree3e2d1c5ac6feccf8c47d7e8eaa610ad6f47a5bed /sound/soc/rockchip
parentdb4d6d2e6472a5a49801bb5f2c1bd96ed6ffa3d1 (diff)
ASoC: rockchip: spdif: 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-3-yangyingliang@huawei.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/rockchip')
-rw-r--r--sound/soc/rockchip/rockchip_spdif.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/sound/soc/rockchip/rockchip_spdif.c b/sound/soc/rockchip/rockchip_spdif.c
index ffb4ec306441..73226a46d489 100644
--- a/sound/soc/rockchip/rockchip_spdif.c
+++ b/sound/soc/rockchip/rockchip_spdif.c
@@ -313,8 +313,7 @@ static int rk_spdif_probe(struct platform_device *pdev)
if (IS_ERR(spdif->mclk))
return PTR_ERR(spdif->mclk);
- 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);