of/device: Move struct of_device define outside of CONFIG_OF_DEVICE test
authorGrant Likely <grant.likely@secretlab.ca>
Thu, 10 Jun 2010 04:22:17 +0000 (22:22 -0600)
committerGrant Likely <grant.likely@secretlab.ca>
Mon, 5 Jul 2010 22:14:51 +0000 (16:14 -0600)
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>
include/linux/of_device.h

index 91d75fb0c726e25d6b6ca3b1fc9e46a085978389..7d27f5a878f604c850fd5f323f321cf289c88129 100644 (file)
@@ -1,13 +1,6 @@
 #ifndef _LINUX_OF_DEVICE_H
 #define _LINUX_OF_DEVICE_H
 
-#ifdef CONFIG_OF_DEVICE
-#include <linux/device.h>
-#include <linux/platform_device.h>
-#include <linux/of.h>
-#include <linux/mod_devicetable.h>
-
-
 /*
  * The of_device *was* a kind of "base class" that was a superset of
  * struct device for use by devices attached to an OF node and probed
  * from the kernel.
  */
 #define of_device platform_device
+#include <linux/platform_device.h>
 
+#ifdef CONFIG_OF_DEVICE
+#include <linux/device.h>
+#include <linux/of.h>
+#include <linux/mod_devicetable.h>
 #include <asm/of_device.h>
 
 #define        to_of_device(d) container_of(d, struct of_device, dev)