diff options
-rw-r--r-- | arch/powerpc/kernel/of_platform.c | 20 | ||||
-rw-r--r-- | include/asm-powerpc/of_platform.h | 10 |
2 files changed, 8 insertions, 22 deletions
diff --git a/arch/powerpc/kernel/of_platform.c b/arch/powerpc/kernel/of_platform.c index aeaa20268c..79c04d151d 100644 --- a/arch/powerpc/kernel/of_platform.c +++ b/arch/powerpc/kernel/of_platform.c | |||
@@ -64,26 +64,6 @@ static int __init of_bus_driver_init(void) | |||
64 | 64 | ||
65 | postcore_initcall(of_bus_driver_init); | 65 | postcore_initcall(of_bus_driver_init); |
66 | 66 | ||
67 | int of_register_platform_driver(struct of_platform_driver *drv) | ||
68 | { | ||
69 | /* initialize common driver fields */ | ||
70 | if (!drv->driver.name) | ||
71 | drv->driver.name = drv->name; | ||
72 | if (!drv->driver.owner) | ||
73 | drv->driver.owner = drv->owner; | ||
74 | drv->driver.bus = &of_platform_bus_type; | ||
75 | |||
76 | /* register with core */ | ||
77 | return driver_register(&drv->driver); | ||
78 | } | ||
79 | EXPORT_SYMBOL(of_register_platform_driver); | ||
80 | |||
81 | void of_unregister_platform_driver(struct of_platform_driver *drv) | ||
82 | { | ||
83 | driver_unregister(&drv->driver); | ||
84 | } | ||
85 | EXPORT_SYMBOL(of_unregister_platform_driver); | ||
86 | |||
87 | struct of_device* of_platform_device_create(struct device_node *np, | 67 | struct of_device* of_platform_device_create(struct device_node *np, |
88 | const char *bus_id, | 68 | const char *bus_id, |
89 | struct device *parent) | 69 | struct device *parent) |
diff --git a/include/asm-powerpc/of_platform.h b/include/asm-powerpc/of_platform.h index 80e6fad28b..d20a4cd08f 100644 --- a/include/asm-powerpc/of_platform.h +++ b/include/asm-powerpc/of_platform.h | |||
@@ -15,8 +15,14 @@ | |||
15 | #include <linux/of_platform.h> | 15 | #include <linux/of_platform.h> |
16 | 16 | ||
17 | /* Platform drivers register/unregister */ | 17 | /* Platform drivers register/unregister */ |
18 | extern int of_register_platform_driver(struct of_platform_driver *drv); | 18 | static inline int of_register_platform_driver(struct of_platform_driver *drv) |
19 | extern void of_unregister_platform_driver(struct of_platform_driver *drv); | 19 | { |
20 | return of_register_driver(drv, &of_platform_bus_type); | ||
21 | } | ||
22 | static inline void of_unregister_platform_driver(struct of_platform_driver *drv) | ||
23 | { | ||
24 | of_unregister_driver(drv); | ||
25 | } | ||
20 | 26 | ||
21 | /* Platform devices and busses creation */ | 27 | /* Platform devices and busses creation */ |
22 | extern struct of_device *of_platform_device_create(struct device_node *np, | 28 | extern struct of_device *of_platform_device_create(struct device_node *np, |