From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate.crashing.org (gate.crashing.org [63.228.1.57]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id C83D2B7DB2 for ; Sun, 14 Feb 2010 17:36:18 +1100 (EST) Subject: Re: [PATCH 3/9] of: protect linux/of.h with CONFIG_OF From: Benjamin Herrenschmidt To: Grant Likely In-Reply-To: <20100213160242.4767.57641.stgit@angua> References: <20100213154838.4767.83881.stgit@angua> <20100213160242.4767.57641.stgit@angua> Content-Type: text/plain; charset="UTF-8" Date: Sun, 14 Feb 2010 17:10:34 +1100 Message-ID: <1266127834.16346.60.camel@pasglop> Mime-Version: 1.0 Cc: sfr@canb.auug.org.au, monstr@monstr.eu, microblaze-uclinux@itee.uq.edu.au, devicetree-discuss@lists.ozlabs.org, linux-kernel@vger.kernel.org, linuxppc-dev@ozlabs.org, sparclinux@vger.kernel.org, jeremy.kerr@canonical.com, davem@davemloft.net List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Sat, 2010-02-13 at 09:02 -0700, Grant Likely wrote: > From: Jeremy Kerr > > For platforms that have CONFIG_OF optional, we need to make the contents > of linux/of.h conditional on CONFIG_OF. > > Signed-off-by: Jeremy Kerr > Signed-off-by: Grant Likely Acked-by: Benjamin Herrenschmidt For now... In the long run, maybe we want some of the iterators to be empty inlines returning NULL ? Cheers, Ben. > --- > > include/linux/of.h | 3 +++ > 1 files changed, 3 insertions(+), 0 deletions(-) > > diff --git a/include/linux/of.h b/include/linux/of.h > index 5c7b6a6..48b0ee6 100644 > --- a/include/linux/of.h > +++ b/include/linux/of.h > @@ -22,6 +22,8 @@ > > #include > > +#ifdef CONFIG_OF > + > typedef u32 phandle; > typedef u32 ihandle; > > @@ -194,4 +196,5 @@ extern void of_attach_node(struct device_node *); > extern void of_detach_node(struct device_node *); > #endif > > +#endif /* CONFIG_OF */ > #endif /* _LINUX_OF_H */