diff options
author | Tang Bin <tangbin@cmss.chinamobile.com> | 2021-03-02 13:50:02 +0100 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2021-03-10 14:13:26 +0100 |
commit | 90b2d37338791311df484d671b262b2ee392962c (patch) | |
tree | 3a8d6782e1a2a09971cb780ddbb5f159b218ca9a /sound/soc/fsl/fsl_xcvr.c | |
parent | ASoC: wm8962: Relax bit clock divider searching (diff) | |
download | linux-90b2d37338791311df484d671b262b2ee392962c.tar.xz linux-90b2d37338791311df484d671b262b2ee392962c.zip |
ASoC: fsl_xcvr: Use devm_platform_ioremap_resource_byname() to simplify code
In this function, devm_platform_ioremap_resource_byname() should be
suitable to simplify code.
Signed-off-by: Tang Bin <tangbin@cmss.chinamobile.com>
Link: https://lore.kernel.org/r/20210302125002.23900-1-tangbin@cmss.chinamobile.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/fsl/fsl_xcvr.c')
-rw-r--r-- | sound/soc/fsl/fsl_xcvr.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/sound/soc/fsl/fsl_xcvr.c b/sound/soc/fsl/fsl_xcvr.c index 80416e4ed53e..6cb558165848 100644 --- a/sound/soc/fsl/fsl_xcvr.c +++ b/sound/soc/fsl/fsl_xcvr.c @@ -1130,7 +1130,7 @@ static int fsl_xcvr_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; struct fsl_xcvr *xcvr; - struct resource *ram_res, *regs_res, *rx_res, *tx_res; + struct resource *rx_res, *tx_res; void __iomem *regs; int ret, irq; @@ -1165,13 +1165,11 @@ static int fsl_xcvr_probe(struct platform_device *pdev) return PTR_ERR(xcvr->pll_ipg_clk); } - ram_res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "ram"); - xcvr->ram_addr = devm_ioremap_resource(dev, ram_res); + xcvr->ram_addr = devm_platform_ioremap_resource_byname(pdev, "ram"); if (IS_ERR(xcvr->ram_addr)) return PTR_ERR(xcvr->ram_addr); - regs_res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "regs"); - regs = devm_ioremap_resource(dev, regs_res); + regs = devm_platform_ioremap_resource_byname(pdev, "regs"); if (IS_ERR(regs)) return PTR_ERR(regs); |