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>
This commit is contained in:
Yang Yingliang 2021-06-11 13:02:35 +08:00 committed by Mark Brown
parent c223f41c1a
commit 3814c41778
No known key found for this signature in database
GPG Key ID: 24D68B725D5487D0

View File

@ -1308,7 +1308,6 @@ static int cygnus_ssp_probe(struct platform_device *pdev)
{ {
struct device *dev = &pdev->dev; struct device *dev = &pdev->dev;
struct device_node *child_node; struct device_node *child_node;
struct resource *res;
struct cygnus_audio *cygaud; struct cygnus_audio *cygaud;
int err; int err;
int node_count; int node_count;
@ -1320,13 +1319,11 @@ static int cygnus_ssp_probe(struct platform_device *pdev)
dev_set_drvdata(dev, cygaud); dev_set_drvdata(dev, cygaud);
res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "aud"); cygaud->audio = devm_platform_ioremap_resource_byname(pdev, "aud");
cygaud->audio = devm_ioremap_resource(dev, res);
if (IS_ERR(cygaud->audio)) if (IS_ERR(cygaud->audio))
return PTR_ERR(cygaud->audio); return PTR_ERR(cygaud->audio);
res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "i2s_in"); cygaud->i2s_in = devm_platform_ioremap_resource_byname(pdev, "i2s_in");
cygaud->i2s_in = devm_ioremap_resource(dev, res);
if (IS_ERR(cygaud->i2s_in)) if (IS_ERR(cygaud->i2s_in))
return PTR_ERR(cygaud->i2s_in); return PTR_ERR(cygaud->i2s_in);