From: Stephen Rothwell on
Hi Grant,

On Mon, 22 Feb 2010 08:50:59 -0700 Grant Likely <grant.likely(a)secretlab.ca> wrote:
>
> - If CONFIG_OF_FLATTREE is not set, then make unflatten_device_tree()
> an empty #define.

Any reason not to make this a static inline?

> +#define unflatten_device_tree() do {} while(0)

static inline void unflatten_device_tree(void) {}

--
Cheers,
Stephen Rothwell sfr(a)canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
From: Stephen Rothwell on
Hi Grant,

On Thu, 11 Mar 2010 10:32:03 -0700 Grant Likely <grant.likely(a)secretlab.ca> wrote:
>
> - If CONFIG_OF_FLATTREE is not set, then make unflatten_device_tree()
> an empty #define.

"an empty static inline funtion."

> diff --git a/include/linux/of_fdt.h b/include/linux/of_fdt.h
> index f0fdd1f..54399f1 100644
> --- a/include/linux/of_fdt.h
> +++ b/include/linux/of_fdt.h
> @@ -99,6 +99,8 @@ extern int early_init_dt_scan_root(unsigned long node, const char *uname,
> /* Other Prototypes */
> extern void unflatten_device_tree(void);
> extern void early_init_devtree(void *);
> +#else /* CONFIG_OF_FLATTREE */
> +static inline void define unflatten_device_tree(void) {}
^^^^^^
You need to remove that.

--
Cheers,
Stephen Rothwell sfr(a)canb.auug.org.au
http://www.canb.auug.org.au/~sfr/