summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYang Yingliang <yangyingliang@huawei.com>2021-06-15 22:07:11 +0800
committerMark Brown <broonie@kernel.org>2021-06-21 13:06:26 +0100
commit77b7bae7802848feabe37a92533bee64387906e7 (patch)
tree24a571316e9c08139189dfe9583cf5a6f6ed3277
parente6bb518199181c9c35827a48142fbb548125d0b0 (diff)
downloadlinux-77b7bae7802848feabe37a92533bee64387906e7.tar.gz
linux-77b7bae7802848feabe37a92533bee64387906e7.tar.bz2
linux-77b7bae7802848feabe37a92533bee64387906e7.zip
ASoC: qcom: lpass-cpu: Use devm_platform_get_and_ioremap_resource()
Use devm_platform_get_and_ioremap_resource() to simplify code. Signed-off-by: Yang Yingliang <yangyingliang@huawei.com> Link: https://lore.kernel.org/r/20210615140711.1676704-2-yangyingliang@huawei.com Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r--sound/soc/qcom/lpass-cpu.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/sound/soc/qcom/lpass-cpu.c b/sound/soc/qcom/lpass-cpu.c
index 98f93240fb2a..2d52e9ee44fc 100644
--- a/sound/soc/qcom/lpass-cpu.c
+++ b/sound/soc/qcom/lpass-cpu.c
@@ -788,7 +788,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;
@@ -814,9 +813,7 @@ int asoc_qcom_lpass_cpu_platform_probe(struct platform_device *pdev)
of_lpass_cpu_parse_dai_data(dev, drvdata);
- res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "lpass-lpaif");
-
- drvdata->lpaif = devm_ioremap_resource(dev, res);
+ drvdata->lpaif = devm_platform_ioremap_resource_byname(pdev, "lpass-lpaif");
if (IS_ERR(drvdata->lpaif))
return PTR_ERR(drvdata->lpaif);
@@ -833,9 +830,7 @@ int asoc_qcom_lpass_cpu_platform_probe(struct platform_device *pdev)
}
if (drvdata->hdmi_port_enable) {
- res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "lpass-hdmiif");
-
- drvdata->hdmiif = devm_ioremap_resource(dev, res);
+ drvdata->hdmiif = devm_platform_ioremap_resource_byname(pdev, "lpass-hdmiif");
if (IS_ERR(drvdata->hdmiif))
return PTR_ERR(drvdata->hdmiif);