[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1426233257-27532-2-git-send-email-kwestfie@codeaurora.org>
Date: Fri, 13 Mar 2015 00:54:17 -0700
From: Kenneth Westfield <kwestfie@...eaurora.org>
To: Mark Brown <broonie@...nel.org>,
Liam Girdwood <lgirdwood@...il.com>,
Kumar Gala <galak@...eaurora.org>
Cc: Banajit Goswami <bgoswami@...eaurora.org>,
Patrick Lai <plai@...eaurora.org>,
Takashi Iwai <tiwai@...e.de>, Jaroslav Kysela <perex@...ex.cz>,
David Brown <davidb@...eaurora.org>,
Bryan Huntsman <bryanh@...eaurora.org>,
Rob Herring <robh+dt@...nel.org>,
ALSA Mailing List <alsa-devel@...a-project.org>,
MSM Mailing List <linux-arm-msm@...r.kernel.org>,
Device Tree Mailing List <devicetree@...r.kernel.org>,
Kernel Mailing List <linux-kernel@...r.kernel.org>,
Kenneth Westfield <kwestfie@...eaurora.org>
Subject: [PATCH 2/2] ASoC: qcom: Modify test for DSP in LPASS driver
From: Kenneth Westfield <kwestfie@...eaurora.org>
As the representation of the DSP in the device
tree has changed from a required subnode to an
optional phandle, modify the test for DSP
existence in the LPASS CPU DAI driver,
accordingly.
Signed-off-by: Kenneth Westfield <kwestfie@...eaurora.org>
---
sound/soc/qcom/lpass-cpu.c | 33 +++++++--------------------------
1 file changed, 7 insertions(+), 26 deletions(-)
diff --git a/sound/soc/qcom/lpass-cpu.c b/sound/soc/qcom/lpass-cpu.c
index d5167131787f3a7663665c94dffe6899bd050179..6698d058de29600a464be79490bec641736819c3 100644
--- a/sound/soc/qcom/lpass-cpu.c
+++ b/sound/soc/qcom/lpass-cpu.c
@@ -359,45 +359,26 @@ static const struct regmap_config lpass_cpu_regmap_config = {
.cache_type = REGCACHE_FLAT,
};
-static int lpass_cpu_parse_of(struct device *dev)
+static int lpass_cpu_platform_probe(struct platform_device *pdev)
{
+ struct lpass_data *drvdata;
struct device_node *dsp_of_node;
+ struct resource *res;
+ int ret;
- dsp_of_node = of_get_child_by_name(dev->of_node, "qcom,adsp");
- if (!dsp_of_node) {
- dev_err(dev, "%s() error getting qcom,adsp sub-node\n",
- __func__);
- return -EINVAL;
- }
-
- if (of_device_is_available(dsp_of_node)) {
- dev_err(dev, "%s() DSP exists and holds audio resources\n",
+ dsp_of_node = of_parse_phandle(pdev->dev.of_node, "qcom,adsp", 0);
+ if (dsp_of_node) {
+ dev_err(&pdev->dev, "%s() DSP exists and holds audio resources\n",
__func__);
return -EBUSY;
}
- return 0;
-}
-
-static int lpass_cpu_platform_probe(struct platform_device *pdev)
-{
- struct lpass_data *drvdata;
- struct resource *res;
- int ret;
-
drvdata = devm_kzalloc(&pdev->dev, sizeof(struct lpass_data),
GFP_KERNEL);
if (!drvdata)
return -ENOMEM;
platform_set_drvdata(pdev, drvdata);
- ret = lpass_cpu_parse_of(&pdev->dev);
- if (ret) {
- dev_err(&pdev->dev, "%s() error getting DT node info: %d\n",
- __func__, ret);
- return ret;
- }
-
res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "lpass-lpaif");
if (!res) {
dev_err(&pdev->dev, "%s() error getting resource\n", __func__);
--
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists