public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Rob Herring <robherring2@gmail.com>
To: Stephen Warren <swarren@nvidia.com>
Cc: Grant Likely <grant.likely@secretlab.ca>,
	devicetree-discuss@lists.ozlabs.org,
	linux-kernel@vger.kernel.org, Jean Delvare <khali@linux-fr.org>,
	linux-i2c@vger.kernel.org, Colin Cross <ccross@android.com>,
	linux-tegra@vger.kernel.org, Axel Lin <axel.lin@gmail.com>,
	Ben Dooks <ben-i2c@fluff.org>
Subject: Re: [PATCH] dt: add empty of_get_property for non-dt
Date: Sun, 07 Aug 2011 09:37:52 -0500	[thread overview]
Message-ID: <4E3EA340.2010100@gmail.com> (raw)
In-Reply-To: <1312584630-23371-1-git-send-email-swarren@nvidia.com>

On 08/05/2011 05:50 PM, Stephen Warren wrote:
> The patch adds empty function of_get_property for non-dt build, so that
> drivers migrating to dt can save some '#ifdef CONFIG_OF'.
> 
> This also fixes the current Tegra compile problem in linux-next.
> 
You could just use of_property_read_u32 in the driver. It already has
empty version and will simplify the driver code some.

Rob

> Signed-off-by: Stephen Warren <swarren@nvidia.com>
> ---
>  include/linux/of.h |    7 +++++++
>  1 files changed, 7 insertions(+), 0 deletions(-)
> 
> diff --git a/include/linux/of.h b/include/linux/of.h
> index 0085bb0..9180dc5 100644
> --- a/include/linux/of.h
> +++ b/include/linux/of.h
> @@ -256,6 +256,13 @@ static inline int of_property_read_string(struct device_node *np,
>  	return -ENOSYS;
>  }
>  
> +static inline const void *of_get_property(const struct device_node *node,
> +				const char *name,
> +				int *lenp)
> +{
> +	return NULL;
> +}
> +
>  #endif /* CONFIG_OF */
>  
>  static inline int of_property_read_u32(const struct device_node *np,


  reply	other threads:[~2011-08-07 14:38 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-05 22:50 [PATCH] dt: add empty of_get_property for non-dt Stephen Warren
2011-08-07 14:37 ` Rob Herring [this message]
2011-08-08 19:26   ` Stephen Warren
2011-08-09 17:27 ` Grant Likely

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=4E3EA340.2010100@gmail.com \
    --to=robherring2@gmail.com \
    --cc=axel.lin@gmail.com \
    --cc=ben-i2c@fluff.org \
    --cc=ccross@android.com \
    --cc=devicetree-discuss@lists.ozlabs.org \
    --cc=grant.likely@secretlab.ca \
    --cc=khali@linux-fr.org \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=swarren@nvidia.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