From patchwork Fri Mar 13 07:54:17 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kenneth Westfield X-Patchwork-Id: 6002321 Return-Path: X-Original-To: patchwork-linux-arm-msm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id AFF74BF910 for ; Fri, 13 Mar 2015 07:55:07 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E221D20160 for ; Fri, 13 Mar 2015 07:55:06 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 05057202AE for ; Fri, 13 Mar 2015 07:55:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752415AbbCMHzC (ORCPT ); Fri, 13 Mar 2015 03:55:02 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:44684 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752238AbbCMHy6 (ORCPT ); Fri, 13 Mar 2015 03:54:58 -0400 Received: from smtp.codeaurora.org (localhost [127.0.0.1]) by smtp.codeaurora.org (Postfix) with ESMTP id 9F3471413E2; Fri, 13 Mar 2015 07:54:57 +0000 (UTC) Received: by smtp.codeaurora.org (Postfix, from userid 486) id 891091413E4; Fri, 13 Mar 2015 07:54:57 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from localhost (i-global254.qualcomm.com [199.106.103.254]) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: kwestfie@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id EE2BC1413E2; Fri, 13 Mar 2015 07:54:56 +0000 (UTC) From: Kenneth Westfield To: Mark Brown , Liam Girdwood , Kumar Gala Cc: Banajit Goswami , Patrick Lai , Takashi Iwai , Jaroslav Kysela , David Brown , Bryan Huntsman , Rob Herring , ALSA Mailing List , MSM Mailing List , Device Tree Mailing List , Kernel Mailing List , Kenneth Westfield Subject: [PATCH 2/2] ASoC: qcom: Modify test for DSP in LPASS driver Date: Fri, 13 Mar 2015 00:54:17 -0700 Message-Id: <1426233257-27532-2-git-send-email-kwestfie@codeaurora.org> X-Mailer: git-send-email 1.8.2.1 In-Reply-To: <1426233257-27532-1-git-send-email-kwestfie@codeaurora.org> References: <1426233257-27532-1-git-send-email-kwestfie@codeaurora.org> X-Virus-Scanned: ClamAV using ClamSMTP Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Kenneth Westfield 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 --- 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__);