[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20110131221047.GA27856@angua.secretlab.ca>
Date: Mon, 31 Jan 2011 15:10:47 -0700
From: Grant Likely <grant.likely@...retlab.ca>
To: Thomas Chou <thomas@...ron.com.tw>
Cc: Haavard Skinnemoen <hskinnemoen@...il.com>,
Ben Dooks <ben-linux@...ff.org>, linux-kernel@...r.kernel.org,
nios2-dev@...c.et.ntust.edu.tw,
devicetree-discuss@...ts.ozlabs.org, linux-i2c@...r.kernel.org,
Jean Delvare <khali@...ux-fr.org>
Subject: Re: [PATCH 1/3] of: define dummy of_get_property if not CONFIG_OF
On Mon, Jan 31, 2011 at 11:25:49PM +0800, Thomas Chou wrote:
> This will help to reduce the ifdef CONFIG_OF needed in most
> platform data probing.
>
> Signed-off-by: Thomas Chou <thomas@...ron.com.tw>
With moving the dt reading into a separate function protected by
CONFIG_OF, this patch shouldn't be necessary.
g.
> ---
> include/linux/of.h | 8 ++++++++
> 1 files changed, 8 insertions(+), 0 deletions(-)
>
> diff --git a/include/linux/of.h b/include/linux/of.h
> index cad7cf0..5e122cb 100644
> --- a/include/linux/of.h
> +++ b/include/linux/of.h
> @@ -222,5 +222,13 @@ extern void of_attach_node(struct device_node *);
> extern void of_detach_node(struct device_node *);
> #endif
>
> +#else /* !CONFIG_OF */
> +
> +static inline const void *of_get_property(const struct device_node *node,
> + const char *name, int *lenp)
> +{
> + return NULL;
> +}
> +
> #endif /* CONFIG_OF */
> #endif /* _LINUX_OF_H */
> --
> 1.7.3.5
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists