X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=arch%2Fppc%2Fplatforms%2Fkatana.c;fp=arch%2Fppc%2Fplatforms%2Fkatana.c;h=6e58e30ceed101b1aeace5055a19d4a00583b308;hb=64ba3f394c830ec48a1c31b53dcae312c56f1604;hp=720f8b3e2fbc508b9aa42cc321c32a9b9397d504;hpb=be1e6109ac94a859551f8e1774eb9a8469fe055c;p=linux-2.6.git diff --git a/arch/ppc/platforms/katana.c b/arch/ppc/platforms/katana.c index 720f8b3e2..6e58e30ce 100644 --- a/arch/ppc/platforms/katana.c +++ b/arch/ppc/platforms/katana.c @@ -1,4 +1,6 @@ /* + * arch/ppc/platforms/katana.c + * * Board setup routines for the Artesyn Katana cPCI boards. * * Author: Tim Montgomery @@ -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 #include #include #include @@ -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;