diff options
Diffstat (limited to 'include/linux/of_platform.h')
-rw-r--r-- | include/linux/of_platform.h | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/include/linux/of_platform.h b/include/linux/of_platform.h index 040ce2f6e8de..b47d2040c9f2 100644 --- a/include/linux/of_platform.h +++ b/include/linux/of_platform.h | |||
@@ -81,7 +81,7 @@ extern struct platform_device *of_device_alloc(struct device_node *np, | |||
81 | struct device *parent); | 81 | struct device *parent); |
82 | extern struct platform_device *of_find_device_by_node(struct device_node *np); | 82 | extern struct platform_device *of_find_device_by_node(struct device_node *np); |
83 | 83 | ||
84 | #if !defined(CONFIG_SPARC) /* SPARC has its own device registration method */ | 84 | #ifdef CONFIG_OF_ADDRESS /* device reg helpers depend on OF_ADDRESS */ |
85 | /* Platform devices and busses creation */ | 85 | /* Platform devices and busses creation */ |
86 | extern struct platform_device *of_platform_device_create(struct device_node *np, | 86 | extern struct platform_device *of_platform_device_create(struct device_node *np, |
87 | const char *bus_id, | 87 | const char *bus_id, |
@@ -94,8 +94,19 @@ extern int of_platform_populate(struct device_node *root, | |||
94 | const struct of_device_id *matches, | 94 | const struct of_device_id *matches, |
95 | const struct of_dev_auxdata *lookup, | 95 | const struct of_dev_auxdata *lookup, |
96 | struct device *parent); | 96 | struct device *parent); |
97 | #endif /* !CONFIG_SPARC */ | 97 | #endif /* CONFIG_OF_ADDRESS */ |
98 | 98 | ||
99 | #endif /* CONFIG_OF_DEVICE */ | 99 | #endif /* CONFIG_OF_DEVICE */ |
100 | 100 | ||
101 | #if !defined(CONFIG_OF_ADDRESS) | ||
102 | struct of_dev_auxdata; | ||
103 | static inline int of_platform_populate(struct device_node *root, | ||
104 | const struct of_device_id *matches, | ||
105 | const struct of_dev_auxdata *lookup, | ||
106 | struct device *parent) | ||
107 | { | ||
108 | return -ENODEV; | ||
109 | } | ||
110 | #endif /* !CONFIG_OF_ADDRESS */ | ||
111 | |||
101 | #endif /* _LINUX_OF_PLATFORM_H */ | 112 | #endif /* _LINUX_OF_PLATFORM_H */ |