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: 139854 Delivered-To: patch@linaro.org Received: by 2002:a2e:970d:0:0:0:0:0 with SMTP id r13-v6csp4065623lji; Mon, 25 Jun 2018 07:34:01 -0700 (PDT) X-Google-Smtp-Source: ADUXVKIrKyYY4N3QQygiolaNu9o4H6wkBCG8jICevk+Kj+viSQlJQR82ovhuVDC1lmtjkVXvqPss X-Received: by 2002:a65:4cc5:: with SMTP id n5-v6mr2555218pgt.451.1529937241839; Mon, 25 Jun 2018 07:34:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529937241; cv=none; d=google.com; s=arc-20160816; b=zYj5oIb501WtmzHdMNsoSt/7of5HcYd7OVTCS86/Drk6bGSDaycu9/YU0VefcNX6lJ cepIWCqBfjfJ839350pn8ZK+WaIfMZFzfm8nbJUgRUbywcF8DcanRf03wHXz7shx78no gX1j3HfsQ2vLGtABVcMkteXz09JR4SRulwEFHRJQPGcfop7aYmC4ta+8SgCA486T9SEz AFZlUtAN8AVSpYLaydYdv88w+xTlX8Dwy4pLT9LN2onR0nzhZQDTfsdQ31QzhtV6g4X7 9pu0fsm5+Ab4Rb2ARmlJXlUv+fvXZcWFxQFNRYJTiV7TKflJlxt1b2wKpHsBCvc/z3n7 kU9g== 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=hgvLfjpSJq04kHiAyB6ojv7qfliHXJDakYppcfVsRDM=; b=sPsSa79qLlZqSc9dffswtD52E2MjSPYWWPkxjDulMuZkf8wPvLMF3jUsE41t98KHKp uYKTU1MdRTcs4SO3IYlk6B1cgBdj+kUfigDOEhLTKT//BEs3hYlUPh0RXITYY6bqNFUx 03wV+1uI1wkaHlTvK/tnpt8gFRh7D4Q7a0C1x599o1DVkKIPGwdNPHT52QFyM9jXR+5Z Y+29a4CiXvjpdQaGn/Di+dv80e51eJ6hbrnMWTW+dNT8gYzReyKirX2iYrUbVVkxJ+V5 CbMLEvb8YaPPLkPwUwTSnZdQaTbo43SMBnmmoxE0xIiY3jNzSXh4uM8wsX5P5jTVhr8m LlIQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=FBxXvnxL; spf=pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-arm-msm-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.34.01; Mon, 25 Jun 2018 07:34:01 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-arm-msm-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=FBxXvnxL; spf=pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-arm-msm-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 S934408AbeFYOd7 (ORCPT + 13 others); Mon, 25 Jun 2018 10:33:59 -0400 Received: from mail-wm0-f65.google.com ([74.125.82.65]:39869 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934387AbeFYOdw (ORCPT ); Mon, 25 Jun 2018 10:33:52 -0400 Received: by mail-wm0-f65.google.com with SMTP id p11-v6so10257406wmc.4 for ; Mon, 25 Jun 2018 07:33:51 -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=M/Lezjsj6OK+vCSTKVH7VQr109nLMBXSsCf8anesryb1spBWbx3z1A1QSOQ8K9Rt3N SKUuUTXK5wRWTvAfjIBMG849P3dAvcruQNvuCqZqhV/iENApm6XDxDp0Tp9m7hRAkus0 1abRhQ6wXsD/eb8DXDbSGgzmCwkffTKveee8RwBNQWTxXLwHv/scHiN68rLDEWRV2QEm LxIHNbBr2eQjeuk63OpgCegE/5xntFYG9xKcmW66bY+TZ2dkpNRvhxQC8GfoIAw57g5T Qh8Pfxn8vXCOo8MazS46NwXUp9Sy/cqFwHEZOdNQJoZDaMwzuDhIAhyRR18lG1xK9Ibz ov1A== X-Gm-Message-State: APt69E05w5gS/PKLmqdrHWmq0UNcFAWQKVWsTZaFJAMsiT45z37eSFXO 6iHeUWmS+DDPKjJbUwiVpoYzjA== 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 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 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> Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@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/q6adm.c | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) -- 2.16.2 -- To unsubscribe from this list: send the line "unsubscribe linux-arm-msm" 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/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; }