Messages in this thread Patch in this message | | | From | Tang Bin <> | Subject | [PATCH] ASoC: qcom: Use devm_platform_ioremap_resource_byname() to simplify code | Date | Mon, 4 May 2020 15:28:20 +0800 |
| |
Use devm_platform_ioremap_resource_byname() instead of platform_get_resource_byname() + devm_ioremap_resource().
Signed-off-by: Zhang Shengju <zhangshengju@cmss.chinamobile.com> Signed-off-by: Tang Bin <tangbin@cmss.chinamobile.com> --- sound/soc/qcom/lpass-cpu.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/sound/soc/qcom/lpass-cpu.c b/sound/soc/qcom/lpass-cpu.c index dbce7e92b..885c1f2e7 100644 --- a/sound/soc/qcom/lpass-cpu.c +++ b/sound/soc/qcom/lpass-cpu.c @@ -417,7 +417,6 @@ int asoc_qcom_lpass_cpu_platform_probe(struct platform_device *pdev) { struct lpass_data *drvdata; struct device_node *dsp_of_node; - struct resource *res; struct lpass_variant *variant; struct device *dev = &pdev->dev; const struct of_device_id *match; @@ -442,9 +441,8 @@ int asoc_qcom_lpass_cpu_platform_probe(struct platform_device *pdev) drvdata->variant = (struct lpass_variant *)match->data; variant = drvdata->variant; - res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "lpass-lpaif"); - - drvdata->lpaif = devm_ioremap_resource(&pdev->dev, res); + drvdata->lpaif = devm_platform_ioremap_resource_byname(pdev, + "lpass-lpaif") if (IS_ERR((void const __force *)drvdata->lpaif)) { dev_err(&pdev->dev, "error mapping reg resource: %ld\n", PTR_ERR((void const __force *)drvdata->lpaif)); -- 2.20.1.windows.1
| |