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: 10488429 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id A3B9A602B3 for ; Tue, 26 Jun 2018 09:25:39 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9E7F728868 for ; Tue, 26 Jun 2018 09:25:39 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 916E02884E; Tue, 26 Jun 2018 09:25:39 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 1A9682884E for ; Tue, 26 Jun 2018 09:25:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=R6MZFRGK6iU9i18w817zCLjyUB9cttkyxc9931u5wEk=; b=ZjrBn5jpTdkaoABRbmZAZkdOLz ysQYQAtCC4p65ozsSBeRW2t+uwWijtcx7DNHCqeeWBt4hX9gTpNHGDDQP0SZ89c4/xMcBaH2v41y6 aB7+bewml8R5sBz1kptcyuOobrCthyIZgfqtgnEEYrTP4ErJjIfXsnzcvuo/M1fzq9GPJV3ZliPAD Hh0QC+E3ChEi4evNntliSxJzNrHogBXBAMStLYn7E4xFw3rIm30e+RHP6QZrSMI6A00oYzxAky0+r BY3FWg94XHjQNFIc6CNyoUEXc/+63APQ3F+Gw/DYR/DE6syg0evxO7pqLGJiKEZaBDpK6jXekyj3q TujT1lew==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fXkE5-0002vO-Bw; Tue, 26 Jun 2018 09:25:29 +0000 Received: from mail-wr0-x244.google.com ([2a00:1450:400c:c0c::244]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fXkBL-0000VW-Aw for linux-arm-kernel@lists.infradead.org; Tue, 26 Jun 2018 09:22:45 +0000 Received: by mail-wr0-x244.google.com with SMTP id b8-v6so11018623wro.6 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=GkLehdOa5Z2d5Zjx97c50bKQ3ov9O64nwE2BF2AOteX3kO3H9D4/+aLtqtqahNHGi0 D5nAHt0uM6aPRqgIZBt1fYyXbfs4ekRsIFj5/Kjz9VutB6iuWY9iAVZWc9jfeGK2vPKu y0TfPXgEgRUkG16yQl8Kkuoa98GVPi5xBUe8JXjzBiHeqxD4bFKGhmv25XXipAdeOWyj 8rPiS4XUIxPwDr/VdRhBr4LObNO+caPEi/U6fyDx/o2hm6hG+dk/ylXTAH4rhxyiuANX KVu5jNy1b25lAaPSj+rB+kD79CnqYnkVKyVGYQgfyrYnn4/s5biJYyaYp08Gr8GN+eWW n8Mg== X-Gm-Message-State: APt69E2pMuKOpUeHR4z/98j0u5h89hWM/mR0w5yPQVTK4qUQBiWlbpg3 fFtiOTmBIjL2z7Xu5Uu5uPsWLMNRLlk= X-Google-Smtp-Source: AAOMgpd+uLbZssc2kK+bH2G/6CAXQBD+Mv7ZyBgOAYorHcX3t7N06eaDlAdNJ7NZCD3qUUUfemtM8g== 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 Subject: [PATCH v2 04/12] ASoC: qdsp6: q6adm: use of_platform_populate/depopulate() 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> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180626_022239_398203_7ABDA65E X-CRM114-Status: GOOD ( 14.04 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, bgoswami@codeaurora.org, lgirdwood@gmail.com, linux-arm-msm@vger.kernel.org, tiwai@suse.com, perex@perex.cz, Srinivas Kandagatla , linux-arm-kernel@lists.infradead.org, niklas.cassel@linaro.org, linux-kernel@vger.kernel.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP 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 Acked-by: Niklas Cassel --- sound/soc/qcom/qdsp6/q6adm.c | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) 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; }