Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp4907352imm; Tue, 26 Jun 2018 02:36:19 -0700 (PDT) X-Google-Smtp-Source: ADUXVKLck55J9X6jcujryDtl+ouCVSCd9FChS4mpd7/cJU2McwEFZmj6nRVU3h7Bp99uWI+okNJC X-Received: by 2002:a63:4d14:: with SMTP id a20-v6mr736086pgb.46.1530005779895; Tue, 26 Jun 2018 02:36:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530005779; cv=none; d=google.com; s=arc-20160816; b=mOkj45RIa9LFdVk20qEl5CGAQRaeQuVypbSrlBrsY9W6xrE6O64FFepsZhNZfDbsxM fTqHTFkfENcNaocG5H6w080Q7XncTM7TPX7aMbhs4hIndvJQcefUR7WuMSFL2KtQZh0t OEyjN4euIUQxJqGQZSGBSuawnmmgOHdmec/cAlN59wGzUjuSmd57atZDheFZ3ZoFyeFE dTNIktGCh7tdgm3UDE1Qq/Kt17svzyOSJPxRlM+nOUwLin3R2PxLsI1itsnNAsYyrqhc FjKQTwJWjM7+2DQrn27Z1pAljSojt1DBBlzGXdptTS3IgwvrXEfIR5DtgSeRaghetQXW Z5zQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=3Jnf7218AXUCjBmCe8t2os8+VXaqMn12ZaVbFxWeItI=; b=KX3rPIoE3fLA1VlvZP6sf82ZdGrmeA8oYBcnoBmu/YPWQBt+O0m+s5fh3BBg5eWCiS BjHhJyg+1CZ4iv6+/h1FrSmHchKSL8I6StU+jG2XLfVe9gi3NmzZitqo6Sf37RZVn2i3 TfxX4c2zQE0SguMY6YxFrd8R/xPGSrKli8rUzmUPMJG6t+/Gqgr0xGYGkCfGg+F6MRfB WlBL5+6uSxWJu58M6vOtw4j49I9J7qIULN8b32CXQJxVJIqxnI94ILjbZp8dZKIoNOBZ VD2bPnvtScfIpgD79b0TfNWPnqqkBJF/F21cV6PfpV5ZI2/AmdakSnk/QgF7segjlJKw OIsQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="ggJPD2B/"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (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 h5-v6si1315146plr.268.2018.06.26.02.35.35; Tue, 26 Jun 2018 02:36:19 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="ggJPD2B/"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934398AbeFZJaL (ORCPT + 99 others); Tue, 26 Jun 2018 05:30:11 -0400 Received: from mail-lj1-f196.google.com ([209.85.208.196]:38063 "EHLO mail-lj1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934129AbeFZJaH (ORCPT ); Tue, 26 Jun 2018 05:30:07 -0400 Received: by mail-lj1-f196.google.com with SMTP id v15-v6so8250452ljk.5 for ; Tue, 26 Jun 2018 02:30:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=3Jnf7218AXUCjBmCe8t2os8+VXaqMn12ZaVbFxWeItI=; b=ggJPD2B/RkiX6POL/fiduO3MfYuswxlHq1fTnElaQZ17h5eyoayvGqmTmElRs2Q395 dgE/OI+HWyyKCpNaZ3WJCSXG4nCvwVD8l8XpKkWIITYwou87cyiAACFszKxn0r44eG8I +JHoxT6uQItjzr/WhQUegL6FPmwEG1oiSRWcs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=3Jnf7218AXUCjBmCe8t2os8+VXaqMn12ZaVbFxWeItI=; b=Nh1MTA0l8HUK4JwBmVKDDaPZDeFzFzCgVDtBnAnejFg1Tsf65A8+XeAhtBqkcT1TOs j5N5rVN3CvVQuCyS6TLeJbLXTVdm607/G5yWtBgKw3Qjaz5JKQDV2VWShYsw9dCDLxh6 8t28Nfiq/xuWWJaGu31cD/mSkcvQ4fOL586aqcmJWFjkgfOmNhPxdi8dI+A4Z6j9Z2vn 2o2T7lK70z68HCmvVUmGK2duJ7dkkSAl1Ivccazo1Fs88xzrJi+Blm7IHBOX05JK52uA sZ/2hyi2jduZcy0wgprnhUNmAwR0be6AuX1TMRcqTCONbZwo/oLez6HLDFvR1luRevw8 lV5Q== X-Gm-Message-State: APt69E3NfoH6l+49f57OCLEowdUwpPUwHfo4tDzFlxEU8REDpoXq3ggv CMFFtRa0Gz1ssXkwwnJBEQ3D7g== X-Received: by 2002:a2e:8184:: with SMTP id e4-v6mr586341ljg.93.1530005406357; Tue, 26 Jun 2018 02:30:06 -0700 (PDT) Received: from centauri.ideon.se ([85.235.10.227]) by smtp.gmail.com with ESMTPSA id q16-v6sm246828lfi.68.2018.06.26.02.30.05 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 26 Jun 2018 02:30:05 -0700 (PDT) Date: Tue, 26 Jun 2018 11:30:03 +0200 From: Niklas Cassel To: Srinivas Kandagatla Cc: broonie@kernel.org, robh+dt@kernel.org, alsa-devel@alsa-project.org, devicetree@vger.kernel.org, linux-arm-msm@vger.kernel.org, lgirdwood@gmail.com, bgoswami@codeaurora.org, tiwai@suse.com, perex@perex.cz, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH v2 04/12] ASoC: qdsp6: q6adm: use of_platform_populate/depopulate() Message-ID: <20180626093003.GB25217@centauri.ideon.se> References: <20180626092016.9296-1-srinivas.kandagatla@linaro.org> <20180626092016.9296-5-srinivas.kandagatla@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180626092016.9296-5-srinivas.kandagatla@linaro.org> User-Agent: Mutt/1.10.0 (2018-05-17) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Acked-by: Niklas Cassel On Tue, Jun 26, 2018 at 10:20:08AM +0100, Srinivas Kandagatla wrote: > 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 | 16 ++-------------- > 1 file changed, 2 insertions(+), 14 deletions(-) > > diff --git a/sound/soc/qcom/qdsp6/q6adm.c b/sound/soc/qcom/qdsp6/q6adm.c > index 9983c665a941..932c3ebfd252 100644 > --- a/sound/soc/qcom/qdsp6/q6adm.c > +++ b/sound/soc/qcom/qdsp6/q6adm.c > @@ -64,7 +64,6 @@ struct q6adm { > struct aprv2_ibasic_rsp_result_t result; > struct mutex lock; > wait_queue_head_t matrix_map_wait; > - struct platform_device *pdev_routing; > }; > > struct q6adm_cmd_device_open_v5 { > @@ -588,7 +587,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 +603,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; > } > -- > 2.16.2 >