]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/ppc/platforms/katana.c
Merge branch 'master' of /home/trondmy/kernel/linux-2.6/
[linux-2.6-omap-h63xx.git] / arch / ppc / platforms / katana.c
index 3eb611e23f69b3e83e99597d9547cfc92550b0bb..720f8b3e2fbc508b9aa42cc321c32a9b9397d504 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/ppc/platforms/katana.c
- *
  * Board setup routines for the Artesyn Katana cPCI boards.
  *
  * Author: Tim Montgomery <timm@artesyncp.com>
@@ -18,7 +16,6 @@
  * 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>
@@ -29,6 +26,7 @@
 #include <linux/seq_file.h>
 #include <linux/mtd/physmap.h>
 #include <linux/mv643xx.h>
+#include <linux/platform_device.h>
 #ifdef CONFIG_BOOTIMG
 #include <linux/bootimg.h>
 #endif
@@ -521,7 +519,7 @@ katana_fixup_resources(struct pci_dev *dev)
 {
        u16     v16;
 
-       pci_write_config_byte(dev, PCI_CACHE_LINE_SIZE, L1_CACHE_LINE_SIZE>>2);
+       pci_write_config_byte(dev, PCI_CACHE_LINE_SIZE, L1_CACHE_BYTES>>2);
 
        pci_read_config_word(dev, PCI_COMMAND, &v16);
        v16 |= PCI_COMMAND_INVALIDATE | PCI_COMMAND_FAST_BACK;
@@ -597,7 +595,7 @@ katana_fixup_mv64xxx_pdata(struct platform_device *pdev)
 }
 #endif
 
-static int __init
+static int
 katana_platform_notify(struct device *dev)
 {
        static struct {
@@ -663,12 +661,11 @@ katana_setup_mtd(void)
 
        ptbl_entries = (size >= (64*MB)) ? 6 : 4;
 
-       if ((ptbl = kmalloc(ptbl_entries * sizeof(struct mtd_partition),
+       if ((ptbl = kcalloc(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;