devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Rob Herring <rob.herring-bsGFqQB8/DxBDgjK7y7TUQ@public.gmane.org>
To: Olof Johansson <olof-nZhT3qVonbNeoWH0uzbU5w@public.gmane.org>
Cc: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org
Subject: Re: [PATCH] dt/platform: minor cleanup
Date: Thu, 03 Nov 2011 08:23:09 -0500	[thread overview]
Message-ID: <4EB295BD.3090501@calxeda.com> (raw)
In-Reply-To: <1320296849-27726-1-git-send-email-olof-nZhT3qVonbNeoWH0uzbU5w@public.gmane.org>

On 11/03/2011 12:07 AM, Olof Johansson wrote:
> * Correct description of of_platform_bus_create to match implementation
> * Remove a level of indentation in of_dev_lookup
> 
> Signed-off-by: Olof Johansson <olof-nZhT3qVonbNeoWH0uzbU5w@public.gmane.org>
> ---

Applied.

Rob

>  drivers/of/platform.c |   28 ++++++++++++++++------------
>  1 files changed, 16 insertions(+), 12 deletions(-)
> 
> diff --git a/drivers/of/platform.c b/drivers/of/platform.c
> index ed5a6d3..cbd5d70 100644
> --- a/drivers/of/platform.c
> +++ b/drivers/of/platform.c
> @@ -310,18 +310,21 @@ static const struct of_dev_auxdata *of_dev_lookup(const struct of_dev_auxdata *l
>  				 struct device_node *np)
>  {
>  	struct resource res;
> -	if (lookup) {
> -		for(; lookup->name != NULL; lookup++) {
> -			if (!of_device_is_compatible(np, lookup->compatible))
> -				continue;
> -			if (of_address_to_resource(np, 0, &res))
> -				continue;
> -			if (res.start != lookup->phys_addr)
> -				continue;
> -			pr_debug("%s: devname=%s\n", np->full_name, lookup->name);
> -			return lookup;
> -		}
> +
> +	if (!lookup)
> +		return NULL;
> +
> +	for(; lookup->name != NULL; lookup++) {
> +		if (!of_device_is_compatible(np, lookup->compatible))
> +			continue;
> +		if (of_address_to_resource(np, 0, &res))
> +			continue;
> +		if (res.start != lookup->phys_addr)
> +			continue;
> +		pr_debug("%s: devname=%s\n", np->full_name, lookup->name);
> +		return lookup;
>  	}
> +
>  	return NULL;
>  }
>  
> @@ -329,8 +332,9 @@ static const struct of_dev_auxdata *of_dev_lookup(const struct of_dev_auxdata *l
>   * of_platform_bus_create() - Create a device for a node and its children.
>   * @bus: device node of the bus to instantiate
>   * @matches: match table for bus nodes
> - * disallow recursive creation of child buses
> + * @lookup: auxdata table for matching id and platform_data with device nodes
>   * @parent: parent for new device, or NULL for top level.
> + * @strict: require compatible property
>   *
>   * Creates a platform_device for the provided device_node, and optionally
>   * recursively create devices for all the child nodes.

      parent reply	other threads:[~2011-11-03 13:23 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-03  5:07 [PATCH] dt/platform: minor cleanup Olof Johansson
     [not found] ` <1320296849-27726-1-git-send-email-olof-nZhT3qVonbNeoWH0uzbU5w@public.gmane.org>
2011-11-03 13:23   ` Rob Herring [this message]

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=4EB295BD.3090501@calxeda.com \
    --to=rob.herring-bsgfqqb8/dxbdgjk7y7tuq@public.gmane.org \
    --cc=devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org \
    --cc=olof-nZhT3qVonbNeoWH0uzbU5w@public.gmane.org \
    /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).