[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200504072820.5328-1-tangbin@cmss.chinamobile.com>
Date: Mon, 4 May 2020 15:28:20 +0800
From: Tang Bin <tangbin@...s.chinamobile.com>
To: broonie@...nel.org, bgoswami@...eaurora.org, plai@...eaurora.org,
perex@...ex.cz
Cc: alsa-devel@...a-project.org, linux-kernel@...r.kernel.org,
Tang Bin <tangbin@...s.chinamobile.com>,
Zhang Shengju <zhangshengju@...s.chinamobile.com>
Subject: [PATCH] ASoC: qcom: Use devm_platform_ioremap_resource_byname() to simplify code
Use devm_platform_ioremap_resource_byname() instead of
platform_get_resource_byname() + devm_ioremap_resource().
Signed-off-by: Zhang Shengju <zhangshengju@...s.chinamobile.com>
Signed-off-by: Tang Bin <tangbin@...s.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
Powered by blists - more mailing lists