Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp4905278imm; Tue, 26 Jun 2018 02:33:45 -0700 (PDT) X-Google-Smtp-Source: AAOMgpcU0yzv3ihS/kMzzk5yM3VOBcB4kac/bM/GiGytE4gtSxRxPwSw45sv0enfu2xKvFQvilGW X-Received: by 2002:a62:ab0e:: with SMTP id p14-v6mr750620pff.211.1530005625795; Tue, 26 Jun 2018 02:33:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530005625; cv=none; d=google.com; s=arc-20160816; b=slNUH1aAPCKss10Xi96ALJkY2AwlsX6THAYzHyLbB3OyXvbLUeyYH/kVCm12CppDY2 2y+zbBLUW+76VUisyHfXxJNoVhk8AvX8/c33Wjvf7vGjjZJYy3iSwt8ZaYuCH+jjkaW1 7xix85wb1+vbCgp14S2bWa7I17q2LVr4rkYjyuex86GliA6IU6INxezirvNJlG1RbukA 9sdxld80p422f3VS8Y8U77SQ2otXXZDUtPQalHTbHhrzZWm0Ya07NTIHGc4GfCJojA+t qS9ovdeAvfELAxNqp9CLodd7TMwnuPzWQD2IkOLTk4Vfp+9NT+ywjTYkGrK2nW0iHe8V p0/w== 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=a16OwTHvyVE63SZhRwW3KLf44hU9K5v7yM0ssTMTY9c=; b=oywILCJb7TblOhQ2i3IpBr/PkzxXpa9/m9P69pnafYuXb9eivlywXyVua15TVVLHHp ffAMXFEx32zIhmOjs7TpIRcEV7vHRFVE+h0kBvGqqNexi3IdiQ6zIpmcgs3fE6FyXBfT aRkZj4XAbyI88xHaUcbVG618SNlbet/G1AS0Unhf4URKjRMQZNhOvLU4Z2fAwxsgB/yp MQiUNsyyJHtG+PcGo1aOEBQdXUYI/vYOA1oLCxS07Nq52A0V2Mso5nSPen3Ix8FKnfjm wIuIlRDBFF7ALUgoHGUmS8otCP7mSjPZT1QlH4fvXYiTFXf87XBk5/ycal1P3OLWMDv6 mqqg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Std+uG2T; 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 p22-v6si1038613pgv.236.2018.06.26.02.33.31; Tue, 26 Jun 2018 02:33:45 -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=Std+uG2T; 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 S934074AbeFZJcv (ORCPT + 99 others); Tue, 26 Jun 2018 05:32:51 -0400 Received: from mail-lj1-f196.google.com ([209.85.208.196]:38968 "EHLO mail-lj1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933263AbeFZJct (ORCPT ); Tue, 26 Jun 2018 05:32:49 -0400 Received: by mail-lj1-f196.google.com with SMTP id t7-v6so6728601ljj.6 for ; Tue, 26 Jun 2018 02:32:48 -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=a16OwTHvyVE63SZhRwW3KLf44hU9K5v7yM0ssTMTY9c=; b=Std+uG2TYq+nSsq82sJTh0lLvfalmSAlDn+TNQWl7kqGpUACdIAm8l4IkqbANyGTGb Yrl2nPPVgFVA7ozjNIf2NC+SCxJfUTVjdl7fKXCVkKYix53WbZHVfwCS2y8Kn0CqWLn7 Tv6AznehTQw6TKxJdV5oIA2ibG4LAAFQdL2R8= 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=a16OwTHvyVE63SZhRwW3KLf44hU9K5v7yM0ssTMTY9c=; b=LiXhxMf+JAv3OwhXwZgxFQ2sw2nb+oZNPuooDBj0uyw0BrsACBaSncpR09vCK1W6J+ L2HaNTcB0Qa+Y4jXA8KUMiC7nnLomeo9vk3o0PsIlPApr5rLh+YR6N4a0rjEVarqVooh steNrWT6d8bLZbeEHIAGyWgExhCNteahK2It4Q7kcAo4a4upxdsMFZhv0+6re6fTLYz9 eRTC7FCi+71MK/ORV6RloNeMLwSvQH4so1WTu8IhQ7thlvjVTb8q62Tfi53g+nr0noJR kTkEUmIZjoh8GYX+kQY/QhTy1lZusvFt+TF/d/S7/CoU4FQxzv6uYjwrIUbSKnItL/9r gNQg== X-Gm-Message-State: APt69E1nKkTKOYx4Lta8T0kAXrlnKQISAEO6LV1El0CdLDx9g/MXLpd7 dq27LyY+fH99x6POhdACSwyCxw== X-Received: by 2002:a2e:870d:: with SMTP id m13-v6mr556856lji.139.1530005568034; Tue, 26 Jun 2018 02:32:48 -0700 (PDT) Received: from centauri.ideon.se ([85.235.10.227]) by smtp.gmail.com with ESMTPSA id 26-v6sm174487lje.26.2018.06.26.02.32.46 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 26 Jun 2018 02:32:47 -0700 (PDT) Date: Tue, 26 Jun 2018 11:32:45 +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 05/12] ASoC: qdsp6: q6asm: use of_platform_populate/depopulate() Message-ID: <20180626093245.GC25217@centauri.ideon.se> References: <20180626092016.9296-1-srinivas.kandagatla@linaro.org> <20180626092016.9296-6-srinivas.kandagatla@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180626092016.9296-6-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:09AM +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/q6asm.c | 16 ++-------------- > 1 file changed, 2 insertions(+), 14 deletions(-) > > diff --git a/sound/soc/qcom/qdsp6/q6asm.c b/sound/soc/qcom/qdsp6/q6asm.c > index 530852385cad..c4fd28f168d5 100644 > --- a/sound/soc/qcom/qdsp6/q6asm.c > +++ b/sound/soc/qcom/qdsp6/q6asm.c > @@ -177,7 +177,6 @@ struct q6asm { > struct platform_device *pcmdev; > spinlock_t slock; > struct audio_client *session[MAX_SESSIONS + 1]; > - struct platform_device *pdev_dais; > }; > > struct audio_client { > @@ -1344,7 +1343,6 @@ EXPORT_SYMBOL_GPL(q6asm_cmd_nowait); > static int q6asm_probe(struct apr_device *adev) > { > struct device *dev = &adev->dev; > - struct device_node *dais_np; > struct q6asm *q6asm; > > q6asm = devm_kzalloc(dev, sizeof(*q6asm), GFP_KERNEL); > @@ -1359,22 +1357,12 @@ static int q6asm_probe(struct apr_device *adev) > spin_lock_init(&q6asm->slock); > dev_set_drvdata(dev, q6asm); > > - dais_np = of_get_child_by_name(dev->of_node, "dais"); > - if (dais_np) { > - q6asm->pdev_dais = of_platform_device_create(dais_np, > - "q6asm-dai", dev); > - of_node_put(dais_np); > - } > - > - return 0; > + return of_platform_populate(dev->of_node, NULL, NULL, dev); > } > > static int q6asm_remove(struct apr_device *adev) > { > - struct q6asm *q6asm = dev_get_drvdata(&adev->dev); > - > - if (q6asm->pdev_dais) > - of_platform_device_destroy(&q6asm->pdev_dais->dev, NULL); > + of_platform_depopulate(&adev->dev); > > return 0; > } > -- > 2.16.2 >