diff options
author | Grant Likely <grant.likely@secretlab.ca> | 2010-06-10 00:22:17 -0400 |
---|---|---|
committer | Grant Likely <grant.likely@secretlab.ca> | 2010-07-05 18:14:51 -0400 |
commit | f9f5a4669f1334a558f102c311debfd008e7c2bc (patch) | |
tree | f07afd4dc4797965ec09f0ed76d429eae5065b87 /include/linux/of_device.h | |
parent | 8cec0e7b4c7c0b76f2b5285f250211ad81c3eafd (diff) |
of/device: Move struct of_device define outside of CONFIG_OF_DEVICE test
Some code uses of_device even when CONFIG_OF_DEVICE is not set. This
patch makes of_device valid all the time by moving it outside of the
ifdef CONFIG_OF_DEVICE test.
Reported-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Acked-by: Randy Dunlap <randy.dunlap@oracle.com>
Diffstat (limited to 'include/linux/of_device.h')
-rw-r--r-- | include/linux/of_device.h | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/include/linux/of_device.h b/include/linux/of_device.h index 91d75fb0c726..7d27f5a878f6 100644 --- a/include/linux/of_device.h +++ b/include/linux/of_device.h | |||
@@ -1,13 +1,6 @@ | |||
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 | ||
5 | #include <linux/device.h> | ||
6 | #include <linux/platform_device.h> | ||
7 | #include <linux/of.h> | ||
8 | #include <linux/mod_devicetable.h> | ||
9 | |||
10 | |||
11 | /* | 4 | /* |
12 | * The of_device *was* a kind of "base class" that was a superset of | 5 | * The of_device *was* a kind of "base class" that was a superset of |
13 | * struct device for use by devices attached to an OF node and probed | 6 | * struct device for use by devices attached to an OF node and probed |
@@ -22,7 +15,12 @@ | |||
22 | * from the kernel. | 15 | * from the kernel. |
23 | */ | 16 | */ |
24 | #define of_device platform_device | 17 | #define of_device platform_device |
18 | #include <linux/platform_device.h> | ||
25 | 19 | ||
20 | #ifdef CONFIG_OF_DEVICE | ||
21 | #include <linux/device.h> | ||
22 | #include <linux/of.h> | ||
23 | #include <linux/mod_devicetable.h> | ||
26 | #include <asm/of_device.h> | 24 | #include <asm/of_device.h> |
27 | 25 | ||
28 | #define to_of_device(d) container_of(d, struct of_device, dev) | 26 | #define to_of_device(d) container_of(d, struct of_device, dev) |