fedora core 6 1.2949 + vserver 2.2.0
[linux-2.6.git] / drivers / mtd / maps / tqm8xxl.c
index a435170..37e4ded 100644 (file)
@@ -22,7 +22,6 @@
  * Thus, we choose CONFIG_MTD_CFI_I2 & CONFIG_MTD_CFI_B4 at
  * kernel configuration.
  */
-#include <linux/config.h>
 #include <linux/module.h>
 #include <linux/types.h>
 #include <linux/kernel.h>
@@ -135,14 +134,13 @@ int __init init_tqm_mtd(void)
 
                printk(KERN_INFO "%s: chip probing count %d\n", __FUNCTION__, idx);
 
-               map_banks[idx] = (struct map_info *)kmalloc(sizeof(struct map_info), GFP_KERNEL);
+               map_banks[idx] = kzalloc(sizeof(struct map_info), GFP_KERNEL);
                if(map_banks[idx] == NULL) {
                        ret = -ENOMEM;
                        /* FIXME: What if some MTD devices were probed already? */
                        goto error_mem;
                }
 
-               memset((void *)map_banks[idx], 0, sizeof(struct map_info));
                map_banks[idx]->name = (char *)kmalloc(16, GFP_KERNEL);
 
                if (!map_banks[idx]->name) {