From: Rob Herring <robherring2-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: Stephen Warren <swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
Cc: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Colin Cross <ccross-z5hGa2qSFaRBDgjK7y7TUQ@public.gmane.org>,
Jean Delvare <khali-PUYAD+kWke1g9hUCZPvPmw@public.gmane.org>,
Axel Lin <axel.lin-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
Ben Dooks <ben-i2c-elnMNo+KYs3YtjvyW6yDsg@public.gmane.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-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
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-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
> ---
> 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,
next prev parent reply other threads:[~2011-08-07 14:37 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
[not found] ` <1312584630-23371-1-git-send-email-swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2011-08-07 14:37 ` Rob Herring [this message]
[not found] ` <4E3EA340.2010100-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
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-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
--cc=axel.lin-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=ben-i2c-elnMNo+KYs3YtjvyW6yDsg@public.gmane.org \
--cc=ccross-z5hGa2qSFaRBDgjK7y7TUQ@public.gmane.org \
--cc=devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org \
--cc=khali-PUYAD+kWke1g9hUCZPvPmw@public.gmane.org \
--cc=linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=swarren-DDmLM1+adcrQT0dZR+AlfA@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).