diff options
Diffstat (limited to 'include/linux/of_platform.h')
-rw-r--r-- | include/linux/of_platform.h | 21 |
1 files changed, 8 insertions, 13 deletions
diff --git a/include/linux/of_platform.h b/include/linux/of_platform.h index a51fd30176aa..133ecf31a60f 100644 --- a/include/linux/of_platform.h +++ b/include/linux/of_platform.h | |||
@@ -17,19 +17,19 @@ | |||
17 | #include <linux/mod_devicetable.h> | 17 | #include <linux/mod_devicetable.h> |
18 | #include <linux/pm.h> | 18 | #include <linux/pm.h> |
19 | #include <linux/of_device.h> | 19 | #include <linux/of_device.h> |
20 | #include <linux/platform_device.h> | ||
20 | 21 | ||
21 | /* | 22 | /* |
22 | * The of_platform_bus_type is a bus type used by drivers that do not | 23 | * of_platform_bus_type isn't it's own bus anymore. It's now just an alias |
23 | * attach to a macio or similar bus but still use OF probing | 24 | * for the platform bus. |
24 | * mechanism | ||
25 | */ | 25 | */ |
26 | extern struct bus_type of_platform_bus_type; | 26 | #define of_platform_bus_type platform_bus_type |
27 | 27 | ||
28 | extern const struct of_device_id of_default_bus_ids[]; | 28 | extern const struct of_device_id of_default_bus_ids[]; |
29 | 29 | ||
30 | /* | 30 | /* |
31 | * An of_platform_driver driver is attached to a basic of_device on | 31 | * An of_platform_driver driver is attached to a basic of_device on |
32 | * the "platform bus" (of_platform_bus_type). | 32 | * the "platform bus" (platform_bus_type). |
33 | */ | 33 | */ |
34 | struct of_platform_driver | 34 | struct of_platform_driver |
35 | { | 35 | { |
@@ -42,6 +42,7 @@ struct of_platform_driver | |||
42 | int (*shutdown)(struct of_device* dev); | 42 | int (*shutdown)(struct of_device* dev); |
43 | 43 | ||
44 | struct device_driver driver; | 44 | struct device_driver driver; |
45 | struct platform_driver platform_driver; | ||
45 | }; | 46 | }; |
46 | #define to_of_platform_driver(drv) \ | 47 | #define to_of_platform_driver(drv) \ |
47 | container_of(drv,struct of_platform_driver, driver) | 48 | container_of(drv,struct of_platform_driver, driver) |
@@ -51,14 +52,8 @@ extern int of_register_driver(struct of_platform_driver *drv, | |||
51 | extern void of_unregister_driver(struct of_platform_driver *drv); | 52 | extern void of_unregister_driver(struct of_platform_driver *drv); |
52 | 53 | ||
53 | /* Platform drivers register/unregister */ | 54 | /* Platform drivers register/unregister */ |
54 | static inline int of_register_platform_driver(struct of_platform_driver *drv) | 55 | extern int of_register_platform_driver(struct of_platform_driver *drv); |
55 | { | 56 | extern void of_unregister_platform_driver(struct of_platform_driver *drv); |
56 | return of_register_driver(drv, &of_platform_bus_type); | ||
57 | } | ||
58 | static inline void of_unregister_platform_driver(struct of_platform_driver *drv) | ||
59 | { | ||
60 | of_unregister_driver(drv); | ||
61 | } | ||
62 | 57 | ||
63 | extern struct of_device *of_device_alloc(struct device_node *np, | 58 | extern struct of_device *of_device_alloc(struct device_node *np, |
64 | const char *bus_id, | 59 | const char *bus_id, |