Message ID | 20210617045012.1119650-3-yangyingliang@huawei.com (mailing list archive) |
---|---|
State | Accepted |
Commit | cc384f05c05618dfcf1990054c1f40bedbb01cca |
Headers | show |
Series | ASoC: sunxi: Use devm_platform_get_and_ioremap_resource() | expand |
diff --git a/sound/soc/sunxi/sun4i-i2s.c b/sound/soc/sunxi/sun4i-i2s.c index c57feae3396e..1e9116cd365e 100644 --- a/sound/soc/sunxi/sun4i-i2s.c +++ b/sound/soc/sunxi/sun4i-i2s.c @@ -1470,8 +1470,7 @@ static int sun4i_i2s_probe(struct platform_device *pdev) return -ENOMEM; platform_set_drvdata(pdev, i2s); - 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);
Use devm_platform_get_and_ioremap_resource() to simplify code. Signed-off-by: Yang Yingliang <yangyingliang@huawei.com> --- sound/soc/sunxi/sun4i-i2s.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)