of: protect linux/of.h with CONFIG_OF
authorJeremy Kerr <jeremy.kerr@canonical.com>
Sun, 14 Feb 2010 14:13:43 +0000 (07:13 -0700)
committerGrant Likely <grant.likely@secretlab.ca>
Sun, 14 Feb 2010 14:13:43 +0000 (07:13 -0700)
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 <jeremy.kerr@canonical.com>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Acked-by: Michal Simek <monstr@monstr.eu>
include/linux/of.h

index 5c7b6a64acd9b2ce32621bd674f229b72ceaaddf..48b0ee6d0f761800d2ed26fe6c7ad3089ce2d2db 100644 (file)
@@ -22,6 +22,8 @@
 
 #include <asm/byteorder.h>
 
+#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 */