From patchwork Mon Jun 25 14:31:09 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Kandagatla X-Patchwork-Id: 139851 Delivered-To: patch@linaro.org Received: by 2002:a2e:970d:0:0:0:0:0 with SMTP id r13-v6csp4065523lji; Mon, 25 Jun 2018 07:33:56 -0700 (PDT) X-Google-Smtp-Source: ADUXVKIsCb2KMCNO4J3I0VI02o/3G1lvv/xLHVrf4v6leBFl0PwvhiNSLvlT3+0evMc5IRPgSxsB X-Received: by 2002:a62:506:: with SMTP id 6-v6mr2091341pff.47.1529937236474; Mon, 25 Jun 2018 07:33:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529937236; cv=none; d=google.com; s=arc-20160816; b=f7vlaT+JtfilH/Q/iaVw3cYtNaoIZl4YC2zy6rvnbMsJLOIv53mJ3/JqDgO5FngMk0 TMeyoIP7NQQjZ2JwRocRP+WiSyDDE0iofZxvZkkSIivH9N56EASCZhYxzUvhR/gODqYn ePnb/2YUoTbElFGRlBdTrS98Yz+54KRrMqsd4sNgE3A48DolXVV54oJGTQNlNxdRAJY0 MtLNCknN4CBA6ROxpXMeT17eP7SpjHmXm0GpgkxKfS/TNtE/LlLuPPWPOkknnefEMj0E C3xQrHZxwWHwxZWiWqmSgJWyy9Sx/w6I6B7nhX6vrbWQuXLRXr0L4hF72tuT4Vx+RwBQ TBDQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=qfRBvFURos0W2PcERzz9Yiv1rONrH25ZW0MRBlxEZKg=; b=zGsacg0WfRhQO4MTqg6XGH5ZASNFu+Xh1+0Nb1se8cOuIlCPZT7JK9j5fxgvYRZMjX PVyK/7PXodJzcS/+/Qt3dXD9ywlBuhDUz3gqAwuMqPhLMSodzQqBx8IYtmsIMp/piSxH n/19bfGE8st7xZRCyFmMZJMGDNOJ1YBfO1MtmORWC/S1g8kSq7oIYOjKUsK73Y5F+BxM 9EvBm40UK39rNZ8aBydsWJcTr6MNVqwER/weiWGtV0ul4rAkobXyc6bIsK6jWq+VDGZx qqSUcXzH9gvdTZufYbYF6bCHDel1pOY8BEBwUaydK514BBRZf+5S5f11WMzRe7db5rEr 9F+A== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=Ia5uQDye; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e12-v6si12023098pgn.171.2018.06.25.07.33.56; Mon, 25 Jun 2018 07:33:56 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=Ia5uQDye; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934394AbeFYOdy (ORCPT + 5 others); Mon, 25 Jun 2018 10:33:54 -0400 Received: from mail-wr0-f196.google.com ([209.85.128.196]:35961 "EHLO mail-wr0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934350AbeFYOdx (ORCPT ); Mon, 25 Jun 2018 10:33:53 -0400 Received: by mail-wr0-f196.google.com with SMTP id f16-v6so13946946wrm.3 for ; Mon, 25 Jun 2018 07:33:52 -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=zeigN2rFjXHvJK3Jeu+ik7aelP61Hx9dVViaQbsLrsc=; b=Ia5uQDyeALxs5UPR7IAZtB05R5zd3VtuNqEsPIyPr3sRtbrPKcmNmZlVf8duq5Krfh a4Rp5EiJXaeMdx0/QAPqPdqBA2EPq1D1k3lux5OJa6wMjax+0drGA6lA8CQJtlqp2eQN OgJkIGumnxzMTg/Q8Lp0Sf7u1sN50zqD7ml6s= 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=zeigN2rFjXHvJK3Jeu+ik7aelP61Hx9dVViaQbsLrsc=; b=l/FM+Ki3/VvPjcGbxmeocEegPdX8Y6PiegZDw8U4QrYJuDFlXwNGzPJtciyAPlXnkW fMv6nQaBUCfAd5nZQmo9NCdWIxB8e4wwFx2kbxS3jIgNeljA1QN4IskfBQW9tE2ufL5Z 2UnYImlMCJAFBe6ZkW4Ndfl7UMhKk3Z7NMkxVBlsz1Sdh50hdJ3npk1eJszRvU6Z62N/ uvatnWM7RbkhfUN7qNvIzPuajd4B9M34+t1G6taKjJ4/4wl0XFyFVhIcQLIN8mkLg9X7 CURmVwwHPYITcptm6pgygBHc08Wu39RfQfz4wsk9hYzdsvR3p6fCN2Rr/UTQOHCB797S 8ZHg== X-Gm-Message-State: APt69E0fYzyKe0/XyF4AKtdOP1ANLhNnD3ULekMVAEbWA56ypMT07EJq QpY1s/4PzTu8URYtRl3x7fay+w== X-Received: by 2002:a5d:44ca:: with SMTP id z10-v6mr10803329wrr.210.1529937231990; Mon, 25 Jun 2018 07:33:51 -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 s12-v6sm1321193wrr.43.2018.06.25.07.33.50 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 25 Jun 2018 07:33:51 -0700 (PDT) From: Srinivas Kandagatla To: broonie@kernel.org, linux-arm-msm@vger.kernel.org, alsa-devel@alsa-project.org, robh+dt@kernel.org, bgoswami@codeaurora.org Cc: lgirdwood@gmail.com, plai@codeaurora.org, tiwai@suse.com, perex@perex.cz, devicetree@vger.kernel.org, rohkumar@qti.qualcomm.com, linux-arm-kernel@lists.infradead.org, srinivas.kandagatla@linaro.org, niklas.cassel@linaro.org Subject: [PATCH 05/11] ASoC: qdsp6: q6asm: use of_platform_populate/depopulate() Date: Mon, 25 Jun 2018 15:31:09 +0100 Message-Id: <20180625143115.8346-6-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180625143115.8346-1-srinivas.kandagatla@linaro.org> References: <20180625143115.8346-1-srinivas.kandagatla@linaro.org> Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.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/q6asm.c | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) -- 2.16.2 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/sound/soc/qcom/qdsp6/q6asm.c b/sound/soc/qcom/qdsp6/q6asm.c index 530852385cad..2b2c7233bb5f 100644 --- a/sound/soc/qcom/qdsp6/q6asm.c +++ b/sound/soc/qcom/qdsp6/q6asm.c @@ -174,10 +174,8 @@ struct q6asm { struct device *dev; struct q6core_svc_api_info ainfo; wait_queue_head_t mem_wait; - struct platform_device *pcmdev; spinlock_t slock; struct audio_client *session[MAX_SESSIONS + 1]; - struct platform_device *pdev_dais; }; struct audio_client { @@ -1344,7 +1342,6 @@ EXPORT_SYMBOL_GPL(q6asm_cmd_nowait); static int q6asm_probe(struct apr_device *adev) { struct device *dev = &adev->dev; - struct device_node *dais_np; struct q6asm *q6asm; q6asm = devm_kzalloc(dev, sizeof(*q6asm), GFP_KERNEL); @@ -1359,22 +1356,12 @@ static int q6asm_probe(struct apr_device *adev) spin_lock_init(&q6asm->slock); dev_set_drvdata(dev, q6asm); - dais_np = of_get_child_by_name(dev->of_node, "dais"); - if (dais_np) { - q6asm->pdev_dais = of_platform_device_create(dais_np, - "q6asm-dai", dev); - of_node_put(dais_np); - } - - return 0; + return of_platform_populate(dev->of_node, NULL, NULL, dev); } static int q6asm_remove(struct apr_device *adev) { - struct q6asm *q6asm = dev_get_drvdata(&adev->dev); - - if (q6asm->pdev_dais) - of_platform_device_destroy(&q6asm->pdev_dais->dev, NULL); + of_platform_depopulate(&adev->dev); return 0; }