libata: separate out ata_ncq_enabled()
[powerpc.git] / drivers / mtd / ftl.c
index da39355..c815d0f 100644 (file)
@@ -61,7 +61,6 @@
 /*#define PSYCHO_DEBUG */
 
 #include <linux/kernel.h>
-#include <linux/sched.h>
 #include <linux/ptrace.h>
 #include <linux/slab.h>
 #include <linux/string.h>
@@ -1033,7 +1032,7 @@ static void ftl_add_mtd(struct mtd_blktrans_ops *tr, struct mtd_info *mtd)
 {
        partition_t *partition;
 
-       partition = kmalloc(sizeof(partition_t), GFP_KERNEL);
+       partition = kzalloc(sizeof(partition_t), GFP_KERNEL);
 
        if (!partition) {
                printk(KERN_WARNING "No memory to scan for FTL on %s\n",
@@ -1041,8 +1040,6 @@ static void ftl_add_mtd(struct mtd_blktrans_ops *tr, struct mtd_info *mtd)
                return;
        }
 
-       memset(partition, 0, sizeof(partition_t));
-
        partition->mbd.mtd = mtd;
 
        if ((scan_header(partition) == 0) &&