mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 19:30:30 +09:00
UPSTREAM: ASoC: rockchip: i2s: Use devm_platform_get_and_ioremap_resource()
Use devm_platform_get_and_ioremap_resource() to simplify
code.
Change-Id: Icf5cb29b7745707b5e12459395653398b70c5e4c
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Link: https://lore.kernel.org/r/20210615141502.1683686-1-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 4ffbcd4ab0)
This commit is contained in:
committed by
Tao Huang
parent
6593ff7ff1
commit
b47a3f11b7
@@ -618,8 +618,7 @@ static int rockchip_i2s_probe(struct platform_device *pdev)
|
||||
return PTR_ERR(i2s->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