From patchwork Tue Jun 26 09:20:08 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Kandagatla X-Patchwork-Id: 139922 Delivered-To: patch@linaro.org Received: by 2002:a2e:970d:0:0:0:0:0 with SMTP id r13-v6csp5006333lji; Tue, 26 Jun 2018 02:23:00 -0700 (PDT) X-Google-Smtp-Source: AAOMgpf/Rdyawd5kqLIYROndsdZmqquUw2OdAbq9ObQTBQsHE/UuZ3wNSlSmxuMNx4MQbrVZXhLz X-Received: by 2002:a1c:4291:: with SMTP id k17-v6mr907790wmi.74.1530004980277; Tue, 26 Jun 2018 02:23:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530004980; cv=none; d=google.com; s=arc-20160816; b=dMo92EBqX5w8ub+Th5WxU/fE0xfaZJxcid4v+gG9U4/4coEoPy/RhBpa8hU0L4up91 dcCLfZIrxJemIl2VULib3OPrkMKpEZMv7KOBjbcfZ/PdKGVuF1qd0aK6LgQXN4PrLlXC iodI2xX+PJ+fvVZB5gZrW9K7EvIloEffWGAzfIQHSPeEMumk8oht2iM+AwT8ZBrUbPDS YSWXxDqIm1aNScdU1qwSSjVTwot2R/Ss47UrAiH7SedgXcp8i+FlBLNWZwJT+R+MHNDP Z0qCwwIG19tZ0PcMnUhnBvwmkRBMP5RLxv4lQnVIBt+VKk9+10f10WLWI8J9XT5TLg0/ BwQA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:cc:references:in-reply-to:message-id :date:to:from:dkim-signature:delivered-to:arc-authentication-results; bh=069k20JJ3GANV4dmpVjjRIBlNkPLJ8frTj/ZXOhi2Ls=; b=J1ko54rYeA8YXgk3HSMw07zmd+Ymlj63Eg3XeUqGiccr07LIgJ5xmfQe5CjrrMowpn BJvHs8T1HNvKf/+DCbiZLcbxEFdgZxaDkte56fc/hwaR4MXhF5+MVIS8lvGMVk3zYc8W yEOho3ofAp4AuS7+Ld3taxHH1M5we0Kzm7cqIBH5bBzBoWLd/ynMiOopQcGFNLcs4/EA XdUHalswkRJANavUFMngRY7X2oqFXrLRhGj4ree05gKI+1+8ODzvk3Dqqc1SZYtX8QK3 LCicbM6Hpz21OonLjgRWdDRSfwDdL/hpLZAXelmoYaBApSxw9UfBauBYi16NW5SySA/K 9KAQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=YEzKI8ML; spf=pass (google.com: domain of alsa-devel-bounces@alsa-project.org designates 77.48.224.243 as permitted sender) smtp.mailfrom=alsa-devel-bounces@alsa-project.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from alsa0.perex.cz (alsa0.perex.cz. [77.48.224.243]) by mx.google.com with ESMTP id x6-v6si1157715wmh.161.2018.06.26.02.23.00; Tue, 26 Jun 2018 02:23:00 -0700 (PDT) Received-SPF: pass (google.com: domain of alsa-devel-bounces@alsa-project.org designates 77.48.224.243 as permitted sender) client-ip=77.48.224.243; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=YEzKI8ML; spf=pass (google.com: domain of alsa-devel-bounces@alsa-project.org designates 77.48.224.243 as permitted sender) smtp.mailfrom=alsa-devel-bounces@alsa-project.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id F3D96267894; Tue, 26 Jun 2018 11:22:37 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id 034E426786D; Tue, 26 Jun 2018 11:22:30 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mail1.perex.cz X-Spam-Level: X-Spam-Status: No, score=-0.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_PASS autolearn=disabled version=3.4.0 Received: from mail-wr0-f193.google.com (mail-wr0-f193.google.com [209.85.128.193]) by alsa0.perex.cz (Postfix) with ESMTP id 5DF0A2676B4 for ; Tue, 26 Jun 2018 11:22:28 +0200 (CEST) Received: by mail-wr0-f193.google.com with SMTP id p1-v6so866487wrs.9 for ; Tue, 26 Jun 2018 02:22:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=cEqIPpNtjb9dQHb944VG2jBsTOC/VovGjNwlIJ+31Dg=; b=YEzKI8MLQZfuWw9gYQhtHgB5gdDGlKPY1gKV+yUFrT3XdbWybEYPlHTjR/CBkJqcqd 4T4VEo9rXJKgUPtP1J7Tl/R6NOHP+xQob37Bie4z3o+0lr/jxinDQDjjmkju8ONGTJb/ r1ehZNGBo3C2IF+94XFq8Jpg/SKK+iYJIV10I= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=cEqIPpNtjb9dQHb944VG2jBsTOC/VovGjNwlIJ+31Dg=; b=Bf2j+CNrs2FHhXA4tM5BGe0GOhnTBAxVzTOFwTvxiEUBRy3R6wOwlUEGCOyFW0QalA 2QAAOQEIJfARkEAVX+/vzSlZrmeGbIhBiBakrv49uG0HY9p4SbtxleEzQPJccOnUrD+p YhA3HENtn4VXUO3HfKsuIKnRPbWYShoaEtQwi5K1U3zbLHY4fupB6qx76IybQdk/IR9z nf7oaYIVN8ULjpgv8r1x7+H7e7DHRVamiF5WPQ4d/xibzT7mKPUyOQB9B28CrceQCFJR F76AbpwremyCwNAWoj/6KU5hTE9nHlRcc8CnkLdeEgtb1X4pZtQTNQceMFDEshQ3Cem/ POHw== X-Gm-Message-State: APt69E0e7OHPxxuNiQJoHb+YX7tUkd4mY8TNpytF5s3lCgZSmrRV9kRz MtBRCSC0zfofUrBidPGOlsfpRg== X-Received: by 2002:adf:9246:: with SMTP id 64-v6mr755074wrj.109.1530004947635; Tue, 26 Jun 2018 02:22:27 -0700 (PDT) Received: from localhost.localdomain (cpc90716-aztw32-2-0-cust92.18-1.cable.virginm.net. [86.26.100.93]) by smtp.gmail.com with ESMTPSA id x5-v6sm1438456wrr.3.2018.06.26.02.22.26 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 26 Jun 2018 02:22:26 -0700 (PDT) From: Srinivas Kandagatla To: broonie@kernel.org, robh+dt@kernel.org, alsa-devel@alsa-project.org Date: Tue, 26 Jun 2018 10:20:08 +0100 Message-Id: <20180626092016.9296-5-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180626092016.9296-1-srinivas.kandagatla@linaro.org> References: <20180626092016.9296-1-srinivas.kandagatla@linaro.org> Cc: devicetree@vger.kernel.org, bgoswami@codeaurora.org, lgirdwood@gmail.com, linux-arm-msm@vger.kernel.org, tiwai@suse.com, Srinivas Kandagatla , linux-arm-kernel@lists.infradead.org, niklas.cassel@linaro.org, linux-kernel@vger.kernel.org Subject: [alsa-devel] [PATCH v2 04/12] ASoC: qdsp6: q6adm: use of_platform_populate/depopulate() X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org Now that the child nodes have there own compatible strings, Use of_platform_populate/depopulate() instead of less common of_platform_device_create()/destroy(). Signed-off-by: Srinivas Kandagatla --- sound/soc/qcom/qdsp6/q6adm.c | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) -- 2.16.2 _______________________________________________ Alsa-devel mailing list Alsa-devel@alsa-project.org http://mailman.alsa-project.org/mailman/listinfo/alsa-devel Acked-by: Niklas Cassel diff --git a/sound/soc/qcom/qdsp6/q6adm.c b/sound/soc/qcom/qdsp6/q6adm.c index 9983c665a941..932c3ebfd252 100644 --- a/sound/soc/qcom/qdsp6/q6adm.c +++ b/sound/soc/qcom/qdsp6/q6adm.c @@ -64,7 +64,6 @@ struct q6adm { struct aprv2_ibasic_rsp_result_t result; struct mutex lock; wait_queue_head_t matrix_map_wait; - struct platform_device *pdev_routing; }; struct q6adm_cmd_device_open_v5 { @@ -588,7 +587,6 @@ EXPORT_SYMBOL_GPL(q6adm_close); static int q6adm_probe(struct apr_device *adev) { struct device *dev = &adev->dev; - struct device_node *dais_np; struct q6adm *adm; adm = devm_kzalloc(&adev->dev, sizeof(*adm), GFP_KERNEL); @@ -605,22 +603,12 @@ static int q6adm_probe(struct apr_device *adev) INIT_LIST_HEAD(&adm->copps_list); spin_lock_init(&adm->copps_list_lock); - dais_np = of_get_child_by_name(dev->of_node, "routing"); - if (dais_np) { - adm->pdev_routing = of_platform_device_create(dais_np, - "q6routing", dev); - of_node_put(dais_np); - } - - return 0; + return of_platform_populate(dev->of_node, NULL, NULL, dev); } static int q6adm_remove(struct apr_device *adev) { - struct q6adm *adm = dev_get_drvdata(&adev->dev); - - if (adm->pdev_routing) - of_platform_device_destroy(&adm->pdev_routing->dev, NULL); + of_platform_depopulate(&adev->dev); return 0; }