From patchwork Mon Jun 25 14:31:10 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Kandagatla X-Patchwork-Id: 10486453 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 2FE546038C for ; Mon, 25 Jun 2018 14:37:16 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0F7F72847B for ; Mon, 25 Jun 2018 14:37:16 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 041E4285A9; Mon, 25 Jun 2018 14:37:16 +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 790882847B for ; Mon, 25 Jun 2018 14:37:15 +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=xgUgcK7SnvJx3YPVxTnrz1YoHjqsgRF9UWisMINpH4I=; b=YdRS2B++RCNDZEMF+ulqNxmmno imas5Q9xpM4u9bsGSK6+jsQW4N9KVxB+jNqmBU1hpQoXz2tcgsztr4VAoC+PTmaKGgZs2YjBo5h4d qSAEoE+tvDQQAN24maT6YMHcs7iZSYUjaCX2buA2loRw/BTeBVjG5bztBcrXERjuek8ec13WwKHQV wcmF9Up/8RuesRu/0ZeZM61LvNADWGqaHcpm54tCzjdQ/LOkCrsb/UbE5R5t87B1DyjLA4tzjONcp 0IIVf1Hvn2smZU6qWCsqyZySVNMr6Uz6Xr4uNxskIK9WEyBkpDZg+sw5pbicaFrqt/YCC8iMaB/VW 2hu2HY3w==; 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 1fXSc2-0007E9-SW; Mon, 25 Jun 2018 14:37:02 +0000 Received: from mail-wm0-x243.google.com ([2a00:1450:400c:c09::243]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fXSZA-0003Qg-TO for linux-arm-kernel@lists.infradead.org; Mon, 25 Jun 2018 14:34:07 +0000 Received: by mail-wm0-x243.google.com with SMTP id e16-v6so9542004wmd.0 for ; Mon, 25 Jun 2018 07:33:54 -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=V9fItdkIf9/Eje17AqtFgZkCUqq9lCnLmyPrZxXcchE=; b=B3cQufyNHBwLpVjoG2hkrhpK/j+9RLnYUcsPT7BCgT8wM4gNfnx9ogUgd1Dpd2Qwjk zSXzuyqmp7ucDZnUSouh2oR8qAo9sl07be+xwUn/rpw9fIVAHhSnxoy6JFAphBwtK/sG oEuJLsGWpjwLOyHU5gnc0lt8jaeTSzEl/50PA= 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=V9fItdkIf9/Eje17AqtFgZkCUqq9lCnLmyPrZxXcchE=; b=FrPtOtL23YC0WF53Hqk65wUPEelOqZb17XNnniHht01OHpW/rqACQAPc5uQOkDR99U 0B0xIidSF86vsrUWSGFDne333OLGD0/Ya2bwuO3ZkgtTRXb5nCZWO0qaxhPZlvUv7043 S2U00RBR+k7QfLarTIorKm6bFoLlvYBC9QJgOjUT1ZNkS1LrO8BVa1bSDFiiYOfNOftQ f3OcPTl8QBs05Jvg+GquU/ArR378OYt6r7OUk6nvn4pHOz63fN8wPN+M8vnvLel6n5Ok vrwkTLexJY5AB5bKPHmmFak2U0UuvqA/H+WIRMp93JdIgZcKNqHwXbObJmeGvbJQIVtv LJ8g== X-Gm-Message-State: APt69E2Oo6nPiX84DHZ8TShDU5FPv9Y4z96RWp74gddlHLfIj8g21Z6O m4hu2gngOjEH758fASxxVlI40w== X-Google-Smtp-Source: ADUXVKItLI1fhL3hiuLUw/XeUz6dE4uDRGxGWTsbodo40d9vNXuTOtT4vIHNgbAmmPfs5b92np6dOQ== X-Received: by 2002:a1c:c3c6:: with SMTP id t189-v6mr1296015wmf.41.1529937233093; Mon, 25 Jun 2018 07:33:53 -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.52 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 25 Jun 2018 07:33:52 -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 Subject: [PATCH 06/11] ASoC: qdsp6: q6afe: use of_platform_populate/depopulate() Date: Mon, 25 Jun 2018 15:31:10 +0100 Message-Id: <20180625143115.8346-7-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> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180625_073404_980125_78198A16 X-CRM114-Status: GOOD ( 13.30 ) 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: rohkumar@qti.qualcomm.com, devicetree@vger.kernel.org, plai@codeaurora.org, tiwai@suse.com, lgirdwood@gmail.com, perex@perex.cz, srinivas.kandagatla@linaro.org, niklas.cassel@linaro.org, linux-arm-kernel@lists.infradead.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/q6afe.c | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/sound/soc/qcom/qdsp6/q6afe.c b/sound/soc/qcom/qdsp6/q6afe.c index 01f43218984b..621b67b34db9 100644 --- a/sound/soc/qcom/qdsp6/q6afe.c +++ b/sound/soc/qcom/qdsp6/q6afe.c @@ -316,7 +316,6 @@ struct q6afe { struct mutex lock; struct list_head port_list; spinlock_t port_list_lock; - struct platform_device *pdev_dais; }; struct afe_port_cmd_device_start { @@ -1438,7 +1437,6 @@ static int q6afe_probe(struct apr_device *adev) { struct q6afe *afe; struct device *dev = &adev->dev; - struct device_node *dais_np; afe = devm_kzalloc(dev, sizeof(*afe), GFP_KERNEL); if (!afe) @@ -1453,22 +1451,12 @@ static int q6afe_probe(struct apr_device *adev) dev_set_drvdata(dev, afe); - dais_np = of_get_child_by_name(dev->of_node, "dais"); - if (dais_np) { - afe->pdev_dais = of_platform_device_create(dais_np, - "q6afe-dai", dev); - of_node_put(dais_np); - } - - return 0; + return of_platform_populate(dev->of_node, NULL, NULL, dev); } static int q6afe_remove(struct apr_device *adev) { - struct q6afe *afe = dev_get_drvdata(&adev->dev); - - if (afe->pdev_dais) - of_platform_device_destroy(&afe->pdev_dais->dev, NULL); + of_platform_depopulate(&adev->dev); return 0; }