Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc
[pandora-kernel.git] / arch / powerpc / kernel / of_device.c
index 7065e40..3262b73 100644 (file)
@@ -1,4 +1,3 @@
-#include <linux/config.h>
 #include <linux/string.h>
 #include <linux/kernel.h>
 #include <linux/init.h>
@@ -132,6 +131,8 @@ static int of_device_resume(struct device * dev)
 struct bus_type of_platform_bus_type = {
        .name   = "of_platform",
        .match  = of_platform_bus_match,
+       .probe  = of_device_probe,
+       .remove = of_device_remove,
        .suspend        = of_device_suspend,
        .resume = of_device_resume,
 };
@@ -145,17 +146,12 @@ postcore_initcall(of_bus_driver_init);
 
 int of_register_driver(struct of_platform_driver *drv)
 {
-       int count = 0;
-
        /* initialize common driver fields */
        drv->driver.name = drv->name;
        drv->driver.bus = &of_platform_bus_type;
-       drv->driver.probe = of_device_probe;
-       drv->driver.remove = of_device_remove;
 
        /* register with core */
-       count = driver_register(&drv->driver);
-       return count ? count : 1;
+       return driver_register(&drv->driver);
 }
 
 void of_unregister_driver(struct of_platform_driver *drv)