From patchwork Tue Jun 26 09:20: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: 10488421 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 5901B602B3 for ; Tue, 26 Jun 2018 09:25:15 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 531A02884E for ; Tue, 26 Jun 2018 09:25:15 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 474502886E; Tue, 26 Jun 2018 09:25:15 +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 E030A2884E for ; Tue, 26 Jun 2018 09:25:14 +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=lORgWfKy+yRTmdQyQfo22mkwkNOdTJYa6/AuuiT8TRM=; b=oE1+CvbaGAk3fJ40b1N+mlYUtB 3DbFcv882VGL/2Z2J7xCF69o4XzCQcxlBqhVC68GwnJDYzFXUiORA3Endu/s4CvpSb0qprTHp0Di5 fRcnGqZsXxejxEWpgd1qmZXP8WDtwL7FwTdk15aGMyF36HpYhuIoGclPJ1oFkXnwW+4R0RxJ5ei6B +En294LLxOpbcDq63oV5q/CU5+sGSOl+z8N/LEnZpZv83hiZdbJUDXWsqJSBOCerx07E8C3XaRUO2 E+G/2Jm+KQvLKD+4/bhs4kNQe3+MwToZBnz9TQ/k18qTngF33uGRYzOe1fFPQQeCwu+sQz4UTvswS qhBYWSDg==; 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 1fXkDg-0001lg-7H; Tue, 26 Jun 2018 09:25:04 +0000 Received: from mail-wm0-x242.google.com ([2a00:1450:400c:c09::242]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fXkBJ-0000Vb-Nd for linux-arm-kernel@lists.infradead.org; Tue, 26 Jun 2018 09:22:40 +0000 Received: by mail-wm0-x242.google.com with SMTP id i139-v6so1022506wmf.4 for ; Tue, 26 Jun 2018 02:22:31 -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=9ntn7tvil3gnvbRPyAg0hZqRPLNr9XRiNe9LjAxmLwo=; b=OrQYumjQI+tnScHt4ElZzhag3QVDdpjFroKkraRlfebj8KKGyZXtzb7vL9MuyhXwaC m5bsQRZXcUMPBZqzSnch419tdNcJoqf3DmJDt0vsZh4lRDUT4Cv7y6Dxi+4pthPWto68 EYLyfGbl83PioMQ6V/nOSPuirpGbv6b16EHf0= 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=9ntn7tvil3gnvbRPyAg0hZqRPLNr9XRiNe9LjAxmLwo=; b=cu8YJFW7QC7IQYM5RcSiOmnBgoT+uux+/hjka9mHjmISAHVK6FazdXvZlrxKIHo+kO HF1H8C1YfyvYz+ycMMZB3Z7eBW/KRuPBc2xHupfgWi/6KzwjvRGFbzShr5EwpOgJxAVK rkGd7ZF5BVjBbJLYBxYsEwdGl7cwLvWOWWQeznQBsnqDLySjTpHQsucFJDoz9dkKbvOa L4WVm8sogIakAWbjNjLqhAg/lettLc/ilQdaIwFWgVeISVinpsUJAahfItf5b9sTUaQK fAkYmF7HNMDpEdkShxJ9zT/F/bRLd0Lqrve8dRen0m4YeAQ1LieOjkHDp51wPwFPg7AB 8YnQ== X-Gm-Message-State: APt69E221Q59wbfXXNxE03XFZVw+FJuSHtQ2G9dRprwOBZ6DXA+Eb/iO IaNBMSU1nsreTt9lAiN83i/hZw== X-Google-Smtp-Source: AAOMgpfXxRRU6Qz0gU8X83f2nn2bOt89rKFbnvLzhkYLT+d9wfW1yEJCw3s85M5wt1MCOGYmACSpoA== X-Received: by 2002:a1c:8893:: with SMTP id k141-v6mr931940wmd.133.1530004950022; Tue, 26 Jun 2018 02:22:30 -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.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 26 Jun 2018 02:22:29 -0700 (PDT) From: Srinivas Kandagatla To: broonie@kernel.org, robh+dt@kernel.org, alsa-devel@alsa-project.org Subject: [PATCH v2 06/12] ASoC: qdsp6: q6afe: use of_platform_populate/depopulate() Date: Tue, 26 Jun 2018 10:20:10 +0100 Message-Id: <20180626092016.9296-7-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_022237_780350_54B586C8 X-CRM114-Status: GOOD ( 13.83 ) 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/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; }