of: protect contents of of_platform.h and of_device.h
Only process contents of of_platform.h and of_device.h if
CONFIG_OF_DEVICE is set.
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
diff --git a/include/linux/of_device.h b/include/linux/of_device.h
index d3a74e0..e7904a9 100644
--- a/include/linux/of_device.h
+++ b/include/linux/of_device.h
@@ -1,6 +1,7 @@
#ifndef _LINUX_OF_DEVICE_H
#define _LINUX_OF_DEVICE_H
+#ifdef CONFIG_OF_DEVICE
#include <linux/device.h>
#include <linux/of.h>
#include <linux/mod_devicetable.h>
@@ -26,5 +27,6 @@
extern ssize_t of_device_get_modalias(struct of_device *ofdev,
char *str, ssize_t len);
+#endif /* CONFIG_OF_DEVICE */
#endif /* _LINUX_OF_DEVICE_H */