Merge git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc
[pandora-kernel.git] / arch / ppc / syslib / ocp.c
index 9ccce43..50c5562 100644 (file)
@@ -36,7 +36,6 @@
  */
 
 #include <linux/module.h>
-#include <linux/config.h>
 #include <linux/list.h>
 #include <linux/miscdevice.h>
 #include <linux/slab.h>
@@ -189,6 +188,8 @@ ocp_device_resume(struct device *dev)
 struct bus_type ocp_bus_type = {
        .name = "ocp",
        .match = ocp_device_match,
+       .probe = ocp_device_probe,
+       .remove = ocp_device_remove,
        .suspend = ocp_device_suspend,
        .resume = ocp_device_resume,
 };
@@ -210,8 +211,6 @@ ocp_register_driver(struct ocp_driver *drv)
        /* initialize common driver fields */
        drv->driver.name = drv->name;
        drv->driver.bus = &ocp_bus_type;
-       drv->driver.probe = ocp_device_probe;
-       drv->driver.remove = ocp_device_remove;
 
        /* register with core */
        return driver_register(&drv->driver);
@@ -451,10 +450,9 @@ ocp_driver_init(void)
        DBG(("ocp: ocp_driver_init()...\n"));
 
        /* Allocate/register primary OCP bus */
-       ocp_bus = kmalloc(sizeof(struct device), GFP_KERNEL);
+       ocp_bus = kzalloc(sizeof(struct device), GFP_KERNEL);
        if (ocp_bus == NULL)
                return 1;
-       memset(ocp_bus, 0, sizeof(struct device));
        strcpy(ocp_bus->bus_id, "ocp");
 
        bus_register(&ocp_bus_type);