summaryrefslogtreecommitdiffstats
path: root/sound/soc/rockchip/rockchip_spdif.c
diff options
context:
space:
mode:
authorYang Yingliang <yangyingliang@huawei.com>2021-06-15 16:15:02 +0200
committerMark Brown <broonie@kernel.org>2021-06-16 16:41:12 +0200
commit3325b1515a92fc07ec16b4d33c8bccc0a83f12ca (patch)
tree3e2d1c5ac6feccf8c47d7e8eaa610ad6f47a5bed /sound/soc/rockchip/rockchip_spdif.c
parentASoC: rockchip: pdm: Use devm_platform_get_and_ioremap_resource() (diff)
downloadlinux-3325b1515a92fc07ec16b4d33c8bccc0a83f12ca.tar.xz
linux-3325b1515a92fc07ec16b4d33c8bccc0a83f12ca.zip
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/rockchip_spdif.c')
-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);