public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Niklas Cassel <niklas.cassel@linaro.org>
To: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
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()
Date: Tue, 26 Jun 2018 11:30:03 +0200	[thread overview]
Message-ID: <20180626093003.GB25217@centauri.ideon.se> (raw)
In-Reply-To: <20180626092016.9296-5-srinivas.kandagatla@linaro.org>

Acked-by: Niklas Cassel <niklas.cassel@linaro.org>

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 <srinivas.kandagatla@linaro.org>
> ---
>  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
> 

  reply	other threads:[~2018-06-26  9:30 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-26  9:20 [PATCH v2 00/12] ASoC: qdsp6: Fix dt based module loading and minor fixes Srinivas Kandagatla
2018-06-26  9:20 ` [PATCH v2 01/12] ASoC: q6adm: dt-bindings: add compatible string to routing Srinivas Kandagatla
2018-06-26  9:20 ` [PATCH v2 02/12] ASoC: q6asm: dt-bindings: add compatible string to dais Srinivas Kandagatla
2018-06-26  9:20 ` [PATCH v2 03/12] ASoC: q6afe: " Srinivas Kandagatla
2018-06-26  9:28   ` Niklas Cassel
2018-06-26 15:11   ` Applied "ASoC: q6afe: dt-bindings: add compatible string to dais" to the asoc tree Mark Brown
2018-06-26  9:20 ` [PATCH v2 04/12] ASoC: qdsp6: q6adm: use of_platform_populate/depopulate() Srinivas Kandagatla
2018-06-26  9:30   ` Niklas Cassel [this message]
2018-06-26 15:11   ` Applied "ASoC: qdsp6: q6adm: use of_platform_populate/depopulate()" to the asoc tree Mark Brown
2018-06-26  9:20 ` [PATCH v2 05/12] ASoC: qdsp6: q6asm: use of_platform_populate/depopulate() Srinivas Kandagatla
2018-06-26  9:32   ` Niklas Cassel
2018-06-26 15:11   ` Applied "ASoC: qdsp6: q6asm: use of_platform_populate/depopulate()" to the asoc tree Mark Brown
2018-06-26  9:20 ` [PATCH v2 06/12] ASoC: qdsp6: q6afe: use of_platform_populate/depopulate() Srinivas Kandagatla
2018-06-26  9:20 ` [PATCH v2 07/12] ASoC: qdsp6: q6afe-dai: support dt based module loading Srinivas Kandagatla
2018-06-26  9:35   ` Niklas Cassel
2018-06-26 15:11   ` Applied "ASoC: qdsp6: q6afe-dai: support dt based module loading" to the asoc tree Mark Brown
2018-06-26  9:20 ` [PATCH v2 08/12] ASoC: qdsp6: q6asm-dai: support dt based module loading Srinivas Kandagatla
2018-06-26  9:35   ` Niklas Cassel
2018-06-26 15:11   ` Applied "ASoC: qdsp6: q6asm-dai: support dt based module loading" to the asoc tree Mark Brown
2018-06-26  9:20 ` [PATCH v2 09/12] ASoC: qdsp6: q6routing: support dt based module loading Srinivas Kandagatla
2018-06-26  9:35   ` Niklas Cassel
2018-06-26 15:11   ` Applied "ASoC: qdsp6: q6routing: support dt based module loading" to the asoc tree Mark Brown
2018-06-26  9:20 ` [PATCH v2 10/12] ASoC: qcom: apq8096: remove redundant owner assignment Srinivas Kandagatla
2018-06-26  9:20 ` [PATCH v2 11/12] ASoC: qdsp6: q6routing: add proper error check Srinivas Kandagatla
2018-06-26  9:36   ` Niklas Cassel
2018-06-26  9:20 ` [PATCH v2 12/12] ASoC: qdsp6: q6asm: remove unused struct q6asm member Srinivas Kandagatla
2018-06-26  9:36   ` Niklas Cassel
2018-06-26 15:10   ` Applied "ASoC: qdsp6: q6asm: remove unused struct q6asm member" to the asoc tree Mark Brown
2018-06-26  9:43 ` [PATCH v2 00/12] ASoC: qdsp6: Fix dt based module loading and minor fixes Niklas Cassel
2018-06-26  9:45   ` Srinivas Kandagatla

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180626093003.GB25217@centauri.ideon.se \
    --to=niklas.cassel@linaro.org \
    --cc=alsa-devel@alsa-project.org \
    --cc=bgoswami@codeaurora.org \
    --cc=broonie@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=perex@perex.cz \
    --cc=robh+dt@kernel.org \
    --cc=srinivas.kandagatla@linaro.org \
    --cc=tiwai@suse.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox