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