diff options
-rw-r--r-- | include/linux/of_device.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/include/linux/of_device.h b/include/linux/of_device.h index 9d27475feec1..82ce324fdce7 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 | #include <linux/cpu.h> | ||
4 | #include <linux/platform_device.h> | 5 | #include <linux/platform_device.h> |
5 | #include <linux/of_platform.h> /* temporary until merge */ | 6 | #include <linux/of_platform.h> /* temporary until merge */ |
6 | 7 | ||
@@ -43,6 +44,15 @@ static inline void of_device_node_put(struct device *dev) | |||
43 | of_node_put(dev->of_node); | 44 | of_node_put(dev->of_node); |
44 | } | 45 | } |
45 | 46 | ||
47 | static inline struct device_node *of_cpu_device_node_get(int cpu) | ||
48 | { | ||
49 | struct device *cpu_dev; | ||
50 | cpu_dev = get_cpu_device(cpu); | ||
51 | if (!cpu_dev) | ||
52 | return NULL; | ||
53 | return of_node_get(cpu_dev->of_node); | ||
54 | } | ||
55 | |||
46 | #else /* CONFIG_OF */ | 56 | #else /* CONFIG_OF */ |
47 | 57 | ||
48 | static inline int of_driver_match_device(struct device *dev, | 58 | static inline int of_driver_match_device(struct device *dev, |
@@ -67,6 +77,11 @@ static inline const struct of_device_id *of_match_device( | |||
67 | { | 77 | { |
68 | return NULL; | 78 | return NULL; |
69 | } | 79 | } |
80 | |||
81 | static inline struct device_node *of_cpu_device_node_get(int cpu) | ||
82 | { | ||
83 | return NULL; | ||
84 | } | ||
70 | #endif /* CONFIG_OF */ | 85 | #endif /* CONFIG_OF */ |
71 | 86 | ||
72 | #endif /* _LINUX_OF_DEVICE_H */ | 87 | #endif /* _LINUX_OF_DEVICE_H */ |