]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
ASoC: stm32: sai: Use devm_platform_get_and_ioremap_resource()
authorYang Yingliang <yangyingliang@huawei.com>
Thu, 17 Jun 2021 04:38:46 +0000 (12:38 +0800)
committerMark Brown <broonie@kernel.org>
Thu, 17 Jun 2021 12:47:01 +0000 (13:47 +0100)
Use devm_platform_get_and_ioremap_resource() to simplify
code.

Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Link: https://lore.kernel.org/r/20210617043847.1113092-3-yangyingliang@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/stm/stm32_sai_sub.c

index 3aa1cf262402034f0706ec8bb923e19fe4b52d1f..9c3b8e2096565b82daa6cbad6c2155493f49b630 100644 (file)
@@ -1361,8 +1361,7 @@ static int stm32_sai_sub_parse_of(struct platform_device *pdev,
        if (!np)
                return -ENODEV;
 
-       res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-       base = devm_ioremap_resource(&pdev->dev, res);
+       base = devm_platform_get_and_ioremap_resource(pdev, 0, &res);
        if (IS_ERR(base))
                return PTR_ERR(base);