diff options
author | Yang Yingliang <yangyingliang@huawei.com> | 2021-06-11 13:02:35 +0800 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2021-06-14 15:01:06 +0100 |
commit | 3814c41778f3489ac103c9a045ae26c082d19be3 (patch) | |
tree | f29b58679431c63e0f8412487a5c2de68c68f7b8 /sound/soc/bcm | |
parent | c223f41c1a52bfe10f1d3311679b1d1f9813e500 (diff) |
ASoC: bcm: cygnus_ssp: Use devm_platform_ioremap_resource_byname()
Use the devm_platform_ioremap_resource_byname() helper instead of
calling platform_get_resource_byname() and devm_ioremap_resource()
separately.
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Link: https://lore.kernel.org/r/20210611050235.4182746-1-yangyingliang@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/bcm')
-rw-r--r-- | sound/soc/bcm/cygnus-ssp.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/sound/soc/bcm/cygnus-ssp.c b/sound/soc/bcm/cygnus-ssp.c index ba03bb62ba96..fca5a3f2eec5 100644 --- a/sound/soc/bcm/cygnus-ssp.c +++ b/sound/soc/bcm/cygnus-ssp.c @@ -1308,7 +1308,6 @@ static int cygnus_ssp_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; struct device_node *child_node; - struct resource *res; struct cygnus_audio *cygaud; int err; int node_count; @@ -1320,13 +1319,11 @@ static int cygnus_ssp_probe(struct platform_device *pdev) dev_set_drvdata(dev, cygaud); - res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "aud"); - cygaud->audio = devm_ioremap_resource(dev, res); + cygaud->audio = devm_platform_ioremap_resource_byname(pdev, "aud"); if (IS_ERR(cygaud->audio)) return PTR_ERR(cygaud->audio); - res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "i2s_in"); - cygaud->i2s_in = devm_ioremap_resource(dev, res); + cygaud->i2s_in = devm_platform_ioremap_resource_byname(pdev, "i2s_in"); if (IS_ERR(cygaud->i2s_in)) return PTR_ERR(cygaud->i2s_in); |