UPSTREAM: ASoC: rockchip: spdif: Use devm_platform_get_and_ioremap_resource()

Use devm_platform_get_and_ioremap_resource() to simplify
code.

Change-Id: I6a9ed25c24734e8b34c3f27aa610d7ce99a0f25a
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>
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
(cherry picked from commit 3325b1515a)
This commit is contained in:
Yang Yingliang
2021-06-15 22:15:02 +08:00
committed by Tao Huang
parent ed769e63f0
commit 9ee45b537d

View File

@@ -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);