From 19934bd11f1c1ff0a23e1f3544bf93fd40563a8f Mon Sep 17 00:00:00 2001 From: Stephen Rothwell Date: Wed, 17 Oct 2007 13:43:34 +1000 Subject: [PATCH] --- yaml --- r: 80999 b: refs/heads/master c: 18cce5d321cf01413f416d7fe9fb00404cba04fd h: refs/heads/master i: 80997: 5532e5174478d1ce04b345147ca7bc3e76d102e7 80995: e8bd44064107fd12f53019774fbd962071bafecf 80991: 0dc26145abe1adda414e9befcad262aa300ef997 v: v3 --- [refs] | 2 +- trunk/arch/powerpc/kernel/of_platform.c | 20 -------------------- trunk/include/asm-powerpc/of_platform.h | 10 ++++++++-- 3 files changed, 9 insertions(+), 23 deletions(-) diff --git a/[refs] b/[refs] index d555119fc0af..f7df835ada33 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: b242a60206881559bb3102110048762422e6b74e +refs/heads/master: 18cce5d321cf01413f416d7fe9fb00404cba04fd diff --git a/trunk/arch/powerpc/kernel/of_platform.c b/trunk/arch/powerpc/kernel/of_platform.c index aeaa20268ce2..79c04d151ddb 100644 --- a/trunk/arch/powerpc/kernel/of_platform.c +++ b/trunk/arch/powerpc/kernel/of_platform.c @@ -64,26 +64,6 @@ static int __init of_bus_driver_init(void) postcore_initcall(of_bus_driver_init); -int of_register_platform_driver(struct of_platform_driver *drv) -{ - /* initialize common driver fields */ - if (!drv->driver.name) - drv->driver.name = drv->name; - if (!drv->driver.owner) - drv->driver.owner = drv->owner; - drv->driver.bus = &of_platform_bus_type; - - /* register with core */ - return driver_register(&drv->driver); -} -EXPORT_SYMBOL(of_register_platform_driver); - -void of_unregister_platform_driver(struct of_platform_driver *drv) -{ - driver_unregister(&drv->driver); -} -EXPORT_SYMBOL(of_unregister_platform_driver); - struct of_device* of_platform_device_create(struct device_node *np, const char *bus_id, struct device *parent) diff --git a/trunk/include/asm-powerpc/of_platform.h b/trunk/include/asm-powerpc/of_platform.h index 80e6fad28b4f..d20a4cd08fa1 100644 --- a/trunk/include/asm-powerpc/of_platform.h +++ b/trunk/include/asm-powerpc/of_platform.h @@ -15,8 +15,14 @@ #include /* Platform drivers register/unregister */ -extern int of_register_platform_driver(struct of_platform_driver *drv); -extern void of_unregister_platform_driver(struct of_platform_driver *drv); +static inline int of_register_platform_driver(struct of_platform_driver *drv) +{ + return of_register_driver(drv, &of_platform_bus_type); +} +static inline void of_unregister_platform_driver(struct of_platform_driver *drv) +{ + of_unregister_driver(drv); +} /* Platform devices and busses creation */ extern struct of_device *of_platform_device_create(struct device_node *np,