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: 139853 Delivered-To: patch@linaro.org Received: by 2002:a2e:970d:0:0:0:0:0 with SMTP id r13-v6csp4065603lji; Mon, 25 Jun 2018 07:34:00 -0700 (PDT) X-Google-Smtp-Source: ADUXVKIdCEKcGJddBRElwBVSf5wh0gXpTeOETEYYkgj30gnXmA/CIxnWdVw6TSCY6490r6gah85m X-Received: by 2002:a65:6292:: with SMTP id f18-v6mr4951944pgv.85.1529937240779; Mon, 25 Jun 2018 07:34:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529937240; cv=none; d=google.com; s=arc-20160816; b=oKrbVrD8i7xXj+6T92BLbGFeeGg1HUbyxe0V7fBmZjh0qBYEL7caeJL6FOoVAOCyK5 r+WsWAm8YeWSvLggefGELB/3e674YsthTITTHfYPYHB0f5BNevzoDHIGdcBc219XMK1a 9Ujs/jvIZK5/14ItwzU/v5Qtxr1JUe1JaBSvH5gwh2IV3epKRupXvtloBJEB8LAgbyZZ +Cs0hxxG3W6o4dXf9hozUTC8oVam8n13rbAfDAEi9Ut8rh+t+9H1/jjCw88HBNXXQmjz CUbI72eXGbsfFFYMxNkhcj+4IXLB9dkzW/Qj4Be9L24FH7LrlyM3Rvh+VlTV+Q4jI7+3 QYQw== 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=pVheAfpbgXsiTavEES3KqOHFUPnh1WUPhYmcNbR+XaE=; b=PwtjWKGoDViZ0p7qP3xwp15B4J9tpHTgO0JXrRF7yUFfK2srbqcA0UDEastWjLpCOT yLDje7jkqVpnpWoM+b19feMA4R0tnI05aKVrQyqWPCwVLK+dJJYcBhxrTB9hRMxP3gBI EaMGZO7xVHHbUWGNQS8CdTMAMLvmIT09Gg7mdUt0tk8AyilmybTRQ5kG30SGHrpJXWRn 2zwQ9oI0yGjIU3H/YiGTTmiFbK4LhQtLpBw2jhf29Sq+SQQIAqFWhGtJyA/jMtl9sZBM yQM/V5+ErKP/r1f5bFhigHSZVy24wgg77B8zyHQKLsVw0Lb9ioGKGvoxWXUu7tPT/Y0e tA3Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=B3cQufyN; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-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.00; Mon, 25 Jun 2018 07:34:00 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of devicetree-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=B3cQufyN; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-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 S934362AbeFYOd6 (ORCPT + 5 others); Mon, 25 Jun 2018 10:33:58 -0400 Received: from mail-wm0-f68.google.com ([74.125.82.68]:55222 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934384AbeFYOdy (ORCPT ); Mon, 25 Jun 2018 10:33:54 -0400 Received: by mail-wm0-f68.google.com with SMTP id i139-v6so2584992wmf.4 for ; Mon, 25 Jun 2018 07:33:53 -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=sdUZJNVJaGDD/RACNE48PdavU19aqT/gU/2zd9Ur5I+ke0pdDKlcfU+SxTeugO/7iY Ymdl778LOEPssO7FxmOxUAWKIFBtZ6TYZGUU/38YV2yg0maPN9MrmK9I43mQ73tx3EeK 0vTPDEYPnsWAoq4nVtSOhRlA4dYXN2rDNIyNYAwp/o4wfu38p3LX38emFH0tVSsX30yC ztX1vmKtaFNE/XBwAECkvD9gcMa1XeKpvyimDKfMG2jh8Jkp8Uwkc9Wb3LhCxW9v0Su3 U7GoqvuKrcvcW4nU+l+uiWy+KZkoCO3HjuB1U4VYb04yrMADoUvV/KAB0/AXkL2UVLCR Q27Q== X-Gm-Message-State: APt69E0bnZBZxi1ka+zRqp3B7La3qbyM+H3t8YZ1dyeblBlPk+ISf+I8 7mV91p+S29n/LMJHxCQ+KhNCLg== 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 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 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> Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@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/q6afe.c | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) -- 2.16.2 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Acked-by: Niklas Cassel 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; }