From patchwork Mon Jun 25 14:31: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: 10486485 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 BCA15601D5 for ; Mon, 25 Jun 2018 14:49:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B35312818A for ; Mon, 25 Jun 2018 14:49:28 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A727E281DB; Mon, 25 Jun 2018 14:49:28 +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 51EE52818A for ; Mon, 25 Jun 2018 14:49:28 +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=5nzbBO8qxUnT/r96rMov6kgg7lQL7er7yGZjM8LDLRc=; b=Tfarsg12gVsBcrIkJCqIo6KfT5 Mcj0e/605pQQ5/XNaRvhpAKwfavvI5poaU8vyQhJqUv/TmraH0uTgARnJUXWEd/jTcgW88mwpp4YS Rsqk1WZj3tp439D4yzDlnq7YTXTU28Nd/EYVnr5fBpFhsvuvkE7sR8BWduoa3sq2A4AIKMTzTFcsq +oYmwnAweBzLvvsFN3LmM+z16aZ1h5yOywNFtz8Dp0CiKgEckovI3q17x4oTWJ3dOFhWwldFvojwS 9RzhmrYCzZsmLSl2XbZ3/S1VHOar15KwCCn8YMBk+HrrarF4hCcWkdwLYRlgHOHEgDcPRU2NycfB+ 1VjpoDYg==; 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 1fXSnv-0008GG-Hg; Mon, 25 Jun 2018 14:49:19 +0000 Received: from mail-wm0-x244.google.com ([2a00:1450:400c:c09::244]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fXSZ8-0003Pq-Nt for linux-arm-kernel@lists.infradead.org; Mon, 25 Jun 2018 14:34:10 +0000 Received: by mail-wm0-x244.google.com with SMTP id z137-v6so4572092wmc.0 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=005lWYnpFaAB/GgiL1XSdMJ4U7I3xmmlIXuLS5p2Q3I=; b=FBxXvnxLrrsUzeYypUxb4V40v11Fz0DJrtIfyZw4KT9IgabJdbestnujK/gsedtGBg lyRk9YYZ3FGjq4110iG4IheJT0VHX9exKQUgDzaWAqMvs4p6EB2cnkfXC5OthU/lEPec q1URi8DqDoSKSO3n/srBHs5NwPiuLvxp80H0Q= 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=005lWYnpFaAB/GgiL1XSdMJ4U7I3xmmlIXuLS5p2Q3I=; b=J5ChPsJCC0DxMM3TSL/OXXgcrmom9EwW0nRRy00s5Xo9VtENccYu2mKPaOSPTb6bCX dOzDz/GnmrRp0G3PMYQyaBhB0xV0LL04e1cP/2l7voV6KyZprUGXnPyYKEUNHtUn87uQ Jx/tOXwP1cj1qfsQEdnk6ulbzvcHnImaSgrpT2oYDWf9DFuAo5cSsmQenEceFhpeEu0S 2lOSYBGJmRKof3BYDEnQBleWYNP92472IOXWLlJnuM588sKeuAx+ZiyNY/Vcx0ESF7BU UXxh3ozvqXO2BVz8ljk7eE3uFtJOKUhC7boM4GptK0TFDcj0+I4aIPcgbZpMZ8q/W2AD 5G0Q== X-Gm-Message-State: APt69E17v/achquu32s4arq1ji/gywYBPC7EdHgAsSQdToDe54pibE7+ tMo+TfHBlcyl4AyNbESNEiI35g== X-Google-Smtp-Source: ADUXVKJksobQdZ0TvJ1O+LcFaps5KLyAXGHkTWJ7LmB1qxtYd77dwH6kyUT++U76YOIbhGUcVCLnmg== X-Received: by 2002:a1c:f906:: with SMTP id x6-v6mr1248629wmh.63.1529937230871; Mon, 25 Jun 2018 07:33:50 -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.49 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 25 Jun 2018 07:33:50 -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 04/11] ASoC: qdsp6: q6adm: use of_platform_populate/depopulate() Date: Mon, 25 Jun 2018 15:31:08 +0100 Message-Id: <20180625143115.8346-5-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_073402_784222_91B8AD86 X-CRM114-Status: GOOD ( 12.34 ) 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 --- sound/soc/qcom/qdsp6/q6adm.c | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/sound/soc/qcom/qdsp6/q6adm.c b/sound/soc/qcom/qdsp6/q6adm.c index 9983c665a941..dfd5bc3ddd52 100644 --- a/sound/soc/qcom/qdsp6/q6adm.c +++ b/sound/soc/qcom/qdsp6/q6adm.c @@ -588,7 +588,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 +604,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; }