mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 19:30:30 +09:00
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:
committed by
Tao Huang
parent
ed769e63f0
commit
9ee45b537d
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user