aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/of_platform.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/of_platform.h')
-rw-r--r--include/linux/of_platform.h34
1 files changed, 3 insertions, 31 deletions
diff --git a/include/linux/of_platform.h b/include/linux/of_platform.h
index 3863a4dbdf18..05cb4a928252 100644
--- a/include/linux/of_platform.h
+++ b/include/linux/of_platform.h
@@ -11,7 +11,6 @@
*
*/
-#ifdef CONFIG_OF_DEVICE
#include <linux/device.h>
#include <linux/mod_devicetable.h>
#include <linux/pm.h>
@@ -52,27 +51,6 @@ struct of_dev_auxdata {
{ .compatible = _compat, .phys_addr = _phys, .name = _name, \
.platform_data = _pdata }
-/**
- * of_platform_driver - Legacy of-aware driver for platform devices.
- *
- * An of_platform_driver driver is attached to a basic platform_device on
- * the ibm ebus (ibmebus_bus_type).
- */
-struct of_platform_driver
-{
- int (*probe)(struct platform_device* dev,
- const struct of_device_id *match);
- int (*remove)(struct platform_device* dev);
-
- int (*suspend)(struct platform_device* dev, pm_message_t state);
- int (*resume)(struct platform_device* dev);
- int (*shutdown)(struct platform_device* dev);
-
- struct device_driver driver;
-};
-#define to_of_platform_driver(drv) \
- container_of(drv,struct of_platform_driver, driver)
-
extern const struct of_device_id of_default_bus_match_table[];
/* Platform drivers register/unregister */
@@ -81,7 +59,6 @@ extern struct platform_device *of_device_alloc(struct device_node *np,
struct device *parent);
extern struct platform_device *of_find_device_by_node(struct device_node *np);
-#ifdef CONFIG_OF_ADDRESS /* device reg helpers depend on OF_ADDRESS */
/* Platform devices and busses creation */
extern struct platform_device *of_platform_device_create(struct device_node *np,
const char *bus_id,
@@ -90,17 +67,12 @@ extern struct platform_device *of_platform_device_create(struct device_node *np,
extern int of_platform_bus_probe(struct device_node *root,
const struct of_device_id *matches,
struct device *parent);
+#ifdef CONFIG_OF_ADDRESS
extern int of_platform_populate(struct device_node *root,
const struct of_device_id *matches,
const struct of_dev_auxdata *lookup,
struct device *parent);
-#endif /* CONFIG_OF_ADDRESS */
-
-#endif /* CONFIG_OF_DEVICE */
-
-#if !defined(CONFIG_OF_ADDRESS)
-struct of_dev_auxdata;
-struct device;
+#else
static inline int of_platform_populate(struct device_node *root,
const struct of_device_id *matches,
const struct of_dev_auxdata *lookup,
@@ -108,6 +80,6 @@ static inline int of_platform_populate(struct device_node *root,
{
return -ENODEV;
}
-#endif /* !CONFIG_OF_ADDRESS */
+#endif
#endif /* _LINUX_OF_PLATFORM_H */