mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: Bo Sun <bo@mboxify.com>, barebox@lists.infradead.org
Subject: Re: [PATCH] of: platform: rename parameter 'bus' to 'node' in of_platform_bus_create()
Date: Thu, 31 Jul 2025 11:04:23 +0200	[thread overview]
Message-ID: <2e595a7d-de5e-4f83-b41d-f304a2bf6191@pengutronix.de> (raw)
In-Reply-To: <20250717131431.1127636-1-bo@mboxify.com>

On 7/17/25 15:14, Bo Sun wrote:
> The parameter represents a device tree node, not specifically a bus.
> Use more accurate naming following device tree conventions.
> 
> Signed-off-by: Bo Sun <bo@mboxify.com>

Acked-by: Ahmad Fatoum <a.fatoum@pengutronix.de>

> ---
>  drivers/of/platform.c | 18 +++++++++---------
>  1 file changed, 9 insertions(+), 9 deletions(-)
> 
> diff --git a/drivers/of/platform.c b/drivers/of/platform.c
> index 3600b5f9c1..092ec39b05 100644
> --- a/drivers/of/platform.c
> +++ b/drivers/of/platform.c
> @@ -399,14 +399,14 @@ static inline struct device *of_amba_device_create(struct device_node *np)
>  
>  /**
>   * of_platform_bus_create() - Create a device for a node and its children.
> - * @bus: device node of the bus to instantiate
> + * @node: device node of the bus to instantiate
>   * @matches: match table for bus nodes
>   * @parent: parent for new device, or NULL for top level.
>   *
>   * Creates a platform_device for the provided device_node, and optionally
>   * recursively create devices for all the child nodes.
>   */
> -static int of_platform_bus_create(struct device_node *bus,
> +static int of_platform_bus_create(struct device_node *node,
>  				const struct of_device_id *matches,
>  				struct device *parent)
>  {
> @@ -415,22 +415,22 @@ static int of_platform_bus_create(struct device_node *bus,
>  	int rc = 0;
>  
>  	/* Make sure it has a compatible property */
> -	if (!of_get_property(bus, "compatible", NULL)) {
> +	if (!of_get_property(node, "compatible", NULL)) {
>  		pr_debug("%s() - skipping %pOF, no compatible prop\n",
> -			__func__, bus);
> +			__func__, node);
>  		return 0;
>  	}
>  
> -	if (of_device_is_compatible(bus, "arm,primecell")) {
> -		if (of_amba_device_create(bus))
> +	if (of_device_is_compatible(node, "arm,primecell")) {
> +		if (of_amba_device_create(node))
>  			return 0;
>  	}
>  
> -	dev = of_platform_device_create(bus, parent);
> -	if (!dev || !of_match_node(matches, bus))
> +	dev = of_platform_device_create(node, parent);
> +	if (!dev || !of_match_node(matches, node))
>  		return 0;
>  
> -	for_each_child_of_node(bus, child) {
> +	for_each_child_of_node(node, child) {
>  		pr_debug("   create child: %pOF\n", child);
>  		rc = of_platform_bus_create(child, matches, dev);
>  		if (rc)
> 
> 

-- 
Pengutronix e.K.                  |                             |
Steuerwalder Str. 21              | http://www.pengutronix.de/  |
31137 Hildesheim, Germany         | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686  | Fax:   +49-5121-206917-5555 |




  reply	other threads:[~2025-07-31  9:05 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-17 13:14 Bo Sun
2025-07-31  9:04 ` Ahmad Fatoum [this message]
2025-08-05  8:26 ` Sascha Hauer

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=2e595a7d-de5e-4f83-b41d-f304a2bf6191@pengutronix.de \
    --to=a.fatoum@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=bo@mboxify.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