From: Lucas Stach <l.stach@pengutronix.de>
To: Marek Vasut <marex@denx.de>, linux-arm-kernel@lists.infradead.org
Cc: Liu Ying <victor.liu@nxp.com>,
Alexander Stein <alexander.stein@ew.tq-group.com>,
Fabio Estevam <festevam@gmail.com>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
NXP Linux Team <linux-imx@nxp.com>,
Paul Elder <paul.elder@ideasonboard.com>,
Peng Fan <peng.fan@nxp.com>,
Pengutronix Kernel Team <kernel@pengutronix.de>,
Richard Cochran <richardcochran@gmail.com>,
Richard Zhu <hongxing.zhu@nxp.com>,
Rob Herring <robh+dt@kernel.org>,
Sascha Hauer <s.hauer@pengutronix.de>,
Shawn Guo <shawnguo@kernel.org>,
devicetree@vger.kernel.org
Subject: Re: [PATCH v3 3/4] soc: imx: imx8m-blk-ctrl: Scan subnodes and bind drivers to them
Date: Wed, 22 Feb 2023 10:20:40 +0100 [thread overview]
Message-ID: <ccd2961a86759197c0d101123a1132a92dfa0003.camel@pengutronix.de> (raw)
In-Reply-To: <e2adc02b-5e6a-3b78-cac2-e67ecc820231@denx.de>
Am Dienstag, dem 21.02.2023 um 19:57 +0100 schrieb Marek Vasut:
> On 2/21/23 18:09, Lucas Stach wrote:
>
> [...]
>
> > > @@ -310,6 +312,13 @@ static int imx8m_blk_ctrl_probe(struct platform_device *pdev)
> > >
> > > dev_set_drvdata(dev, bc);
> > >
> > > + for_each_child_of_node(dev->of_node, np) {
> > > + child = of_platform_device_create(np, NULL, dev);
> > > + if (child)
> > > + continue;
> > > + dev_warn(dev, "failed to create device for %pOF\n", np);
> > > + }
> >
> > Any reason for not using devm_of_platform_populate() instead?
>
> Yes, lack of awareness of that option.
>
> Do I read it right that this gets rid of the whole loop implementation
> here and replaces it with single function call ?
That's right. And it will also do the necessary
of_platform_device_destroy() to clean things up when the parent device
is removed.
Regards,
Lucas
next prev parent reply other threads:[~2023-02-22 9:21 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-21 15:28 [PATCH v3 1/4] dt-bindings: soc: imx8mp-media-blk-ctrl: Align block controller example name Marek Vasut
2023-02-21 15:28 ` [PATCH v3 2/4] dt-bindings: soc: imx8mp-media-blk-ctrl: Add LDB subnode into schema and example Marek Vasut
2023-02-21 15:28 ` [PATCH v3 3/4] soc: imx: imx8m-blk-ctrl: Scan subnodes and bind drivers to them Marek Vasut
2023-02-21 17:09 ` Lucas Stach
2023-02-21 18:57 ` Marek Vasut
2023-02-22 9:20 ` Lucas Stach [this message]
2023-02-22 2:37 ` Liu Ying
2023-02-21 15:28 ` [PATCH v3 4/4] arm64: dts: imx8mp: Drop simple-bus from fsl,imx8mp-media-blk-ctrl Marek Vasut
2023-02-22 8:43 ` [PATCH v3 1/4] dt-bindings: soc: imx8mp-media-blk-ctrl: Align block controller example name Krzysztof Kozlowski
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=ccd2961a86759197c0d101123a1132a92dfa0003.camel@pengutronix.de \
--to=l.stach@pengutronix.de \
--cc=alexander.stein@ew.tq-group.com \
--cc=devicetree@vger.kernel.org \
--cc=festevam@gmail.com \
--cc=hongxing.zhu@nxp.com \
--cc=kernel@pengutronix.de \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-imx@nxp.com \
--cc=marex@denx.de \
--cc=paul.elder@ideasonboard.com \
--cc=peng.fan@nxp.com \
--cc=richardcochran@gmail.com \
--cc=robh+dt@kernel.org \
--cc=s.hauer@pengutronix.de \
--cc=shawnguo@kernel.org \
--cc=victor.liu@nxp.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;
as well as URLs for NNTP newsgroup(s).