Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc
[firefly-linux-kernel-4.4.55.git] / arch / ppc / syslib / ocp.c
index 2fe28ded2c6096080be6bd0665135466dfc1e089..3f5be2c5ce99468ed0dc3586bbd5813f4851a29f 100644 (file)
@@ -27,7 +27,7 @@
  *  device model.  The devices on the OCP bus are seeded by an
  *  an initial OCP device array created by the arch-specific
  *  Device entries can be added/removed/modified through OCP
- *  helper functions to accomodate system and  board-specific
+ *  helper functions to accommodate system and  board-specific
  *  parameters commonly found in embedded systems. OCP also
  *  provides a standard method for devices to describe extended
  *  attributes about themselves to the system.  A standard access
@@ -36,7 +36,6 @@
  */
 
 #include <linux/module.h>
-#include <linux/config.h>
 #include <linux/list.h>
 #include <linux/miscdevice.h>
 #include <linux/slab.h>
 #include <linux/pm.h>
 #include <linux/bootmem.h>
 #include <linux/device.h>
+#include <linux/rwsem.h>
 
 #include <asm/io.h>
 #include <asm/ocp.h>
 #include <asm/errno.h>
-#include <asm/rwsem.h>
 #include <asm/semaphore.h>
 
 //#define DBG(x)       printk x
@@ -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);