diff options
author | Grant Likely <grant.likely@secretlab.ca> | 2010-04-13 19:12:27 -0400 |
---|---|---|
committer | Grant Likely <grant.likely@secretlab.ca> | 2010-04-28 20:20:30 -0400 |
commit | efb2e014fc4f2675011b802e1a84bf9a58756004 (patch) | |
tree | 0992402c966154ba3105e5b7d9387df21754f2ac /include/linux | |
parent | 8bfe9b5c3a684fe39eb58a65e466c103d1c32c9a (diff) |
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>
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/of_device.h | 2 | ||||
-rw-r--r-- | include/linux/of_platform.h | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/of_device.h b/include/linux/of_device.h index d3a74e00a3e1..e7904a9cd3a3 100644 --- a/include/linux/of_device.h +++ b/include/linux/of_device.h | |||
@@ -1,6 +1,7 @@ | |||
1 | #ifndef _LINUX_OF_DEVICE_H | 1 | #ifndef _LINUX_OF_DEVICE_H |
2 | #define _LINUX_OF_DEVICE_H | 2 | #define _LINUX_OF_DEVICE_H |
3 | 3 | ||
4 | #ifdef CONFIG_OF_DEVICE | ||
4 | #include <linux/device.h> | 5 | #include <linux/device.h> |
5 | #include <linux/of.h> | 6 | #include <linux/of.h> |
6 | #include <linux/mod_devicetable.h> | 7 | #include <linux/mod_devicetable.h> |
@@ -26,5 +27,6 @@ static inline void of_device_free(struct of_device *dev) | |||
26 | 27 | ||
27 | extern ssize_t of_device_get_modalias(struct of_device *ofdev, | 28 | extern ssize_t of_device_get_modalias(struct of_device *ofdev, |
28 | char *str, ssize_t len); | 29 | char *str, ssize_t len); |
30 | #endif /* CONFIG_OF_DEVICE */ | ||
29 | 31 | ||
30 | #endif /* _LINUX_OF_DEVICE_H */ | 32 | #endif /* _LINUX_OF_DEVICE_H */ |
diff --git a/include/linux/of_platform.h b/include/linux/of_platform.h index 908406651330..ac3ae0758fbe 100644 --- a/include/linux/of_platform.h +++ b/include/linux/of_platform.h | |||
@@ -11,6 +11,7 @@ | |||
11 | * | 11 | * |
12 | */ | 12 | */ |
13 | 13 | ||
14 | #ifdef CONFIG_OF_DEVICE | ||
14 | #include <linux/module.h> | 15 | #include <linux/module.h> |
15 | #include <linux/device.h> | 16 | #include <linux/device.h> |
16 | #include <linux/mod_devicetable.h> | 17 | #include <linux/mod_devicetable.h> |
@@ -66,5 +67,6 @@ static inline void of_unregister_platform_driver(struct of_platform_driver *drv) | |||
66 | extern struct of_device *of_find_device_by_node(struct device_node *np); | 67 | extern struct of_device *of_find_device_by_node(struct device_node *np); |
67 | 68 | ||
68 | extern int of_bus_type_init(struct bus_type *bus, const char *name); | 69 | extern int of_bus_type_init(struct bus_type *bus, const char *name); |
70 | #endif /* CONFIG_OF_DEVICE */ | ||
69 | 71 | ||
70 | #endif /* _LINUX_OF_PLATFORM_H */ | 72 | #endif /* _LINUX_OF_PLATFORM_H */ |