[PATCH] ocfs2: fix oops in mmap_truncate testing
[pandora-kernel.git] / arch / ppc / platforms / ev64360.c
index 104ac9b..6765676 100644 (file)
@@ -11,7 +11,6 @@
  * Free Software Foundation; either version 2 of the License, or (at your
  * option) any later version.
  */
-#include <linux/config.h>
 #include <linux/kernel.h>
 #include <linux/pci.h>
 #include <linux/kdev_t.h>
@@ -24,9 +23,6 @@
 #include <linux/mtd/physmap.h>
 #include <linux/mv643xx.h>
 #include <linux/platform_device.h>
-#ifdef CONFIG_BOOTIMG
-#include <linux/bootimg.h>
-#endif
 #include <asm/page.h>
 #include <asm/time.h>
 #include <asm/smp.h>
@@ -359,13 +355,12 @@ ev64360_setup_mtd(void)
 
        ptbl_entries = 3;
 
-       if ((ptbl = kmalloc(ptbl_entries * sizeof(struct mtd_partition),
+       if ((ptbl = kzalloc(ptbl_entries * sizeof(struct mtd_partition),
                GFP_KERNEL)) == NULL) {
 
                printk(KERN_WARNING "Can't alloc MTD partition table\n");
                return -ENOMEM;
        }
-       memset(ptbl, 0, ptbl_entries * sizeof(struct mtd_partition));
 
        ptbl[0].name = "reserved";
        ptbl[0].offset = 0;
@@ -475,7 +470,7 @@ platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
         * are non-zero, then we should use the board info from the bd_t
         * structure and the cmdline pointed to by r6 instead of the
         * information from birecs, if any.  Otherwise, use the information
-        * from birecs as discovered by the preceeding call to
+        * from birecs as discovered by the preceding call to
         * parse_bootinfo().  This rule should work with both PPCBoot, which
         * uses a bd_t board info structure, and the kernel boot wrapper,
         * which uses birecs.