linux 2.6.16.38 w/ vs2.0.3-rc1
[linux-2.6.git] / arch / ppc / platforms / katana.c
index 720f8b3..6e58e30 100644 (file)
@@ -1,4 +1,6 @@
 /*
+ * arch/ppc/platforms/katana.c
+ *
  * Board setup routines for the Artesyn Katana cPCI boards.
  *
  * Author: Tim Montgomery <timm@artesyncp.com>
@@ -16,6 +18,7 @@
  * Supports the Artesyn 750i, 752i, and 3750.  The 752i is virtually identical
  * to the 750i except that it has an mv64460 bridge.
  */
+#include <linux/config.h>
 #include <linux/kernel.h>
 #include <linux/pci.h>
 #include <linux/kdev_t.h>
@@ -595,7 +598,7 @@ katana_fixup_mv64xxx_pdata(struct platform_device *pdev)
 }
 #endif
 
-static int
+static int __init
 katana_platform_notify(struct device *dev)
 {
        static struct {
@@ -661,11 +664,12 @@ katana_setup_mtd(void)
 
        ptbl_entries = (size >= (64*MB)) ? 6 : 4;
 
-       if ((ptbl = kcalloc(ptbl_entries, sizeof(struct mtd_partition),
+       if ((ptbl = kmalloc(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 = "Monitor";
        ptbl[0].size = KATANA_MTD_MONITOR_SIZE;