aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorSergei Shtylyov <sergei.shtylyov@cogentembedded.com>2013-02-18 18:58:25 -0500
committerRob Herring <rob.herring@calxeda.com>2013-04-09 15:58:32 -0400
commitd450f445f9a654080a6be4094376c2192d9a1f36 (patch)
treee555c87d9d26e0442008b99f6561031a887d5228 /include
parentf6161aa153581da4a3867a2d1a7caf4be19b6ec9 (diff)
<linux/of_platform.h>: fix compilation warnings with DT disabled
Fix the following compilation warnings (in Simon Horman's renesas.git repo): In file included from arch/arm/mach-shmobile/setup-r8a7779.c:24:0: include/linux/of_platform.h:107:13: warning: ‘struct of_device_id’ declared inside parameter list [enabled by default] include/linux/of_platform.h:107:13: warning: its scope is only this definition or declaration, which is probably not what you want [enabled by default] include/linux/of_platform.h:107:13: warning: ‘struct device_node’ declared inside parameter list [enabled by default] <linux/of_platform.h> only #include's headers with definitions of the above mentioned structures if CONFIG_OF_DEVICE=y but uses them even if not. One solution is to move some #include's out of #ifdef CONFIG_OF_DEVICE and use incomplete declarations for the rest of the structures where the #ifdef move doesn't help... Reported-by: Vladimir Barinov <vladimir.barinov@cogentembedded.com> Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> Signed-off-by: Rob Herring <rob.herring@calxeda.com>
Diffstat (limited to 'include')
-rw-r--r--include/linux/of_platform.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/include/linux/of_platform.h b/include/linux/of_platform.h
index 3863a4dbdf18..2a93b64a3869 100644
--- a/include/linux/of_platform.h
+++ b/include/linux/of_platform.h
@@ -11,9 +11,10 @@
11 * 11 *
12 */ 12 */
13 13
14#ifdef CONFIG_OF_DEVICE
15#include <linux/device.h> 14#include <linux/device.h>
16#include <linux/mod_devicetable.h> 15#include <linux/mod_devicetable.h>
16
17#ifdef CONFIG_OF_DEVICE
17#include <linux/pm.h> 18#include <linux/pm.h>
18#include <linux/of_device.h> 19#include <linux/of_device.h>
19#include <linux/platform_device.h> 20#include <linux/platform_device.h>
@@ -100,7 +101,7 @@ extern int of_platform_populate(struct device_node *root,
100 101
101#if !defined(CONFIG_OF_ADDRESS) 102#if !defined(CONFIG_OF_ADDRESS)
102struct of_dev_auxdata; 103struct of_dev_auxdata;
103struct device; 104struct device_node;
104static inline int of_platform_populate(struct device_node *root, 105static inline int of_platform_populate(struct device_node *root,
105 const struct of_device_id *matches, 106 const struct of_device_id *matches,
106 const struct of_dev_auxdata *lookup, 107 const struct of_dev_auxdata *lookup,