]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/mtd/maps/tqm8xxl.c
Merge branch 'for-2.6.24' of master.kernel.org:/pub/scm/linux/kernel/git/jwboyer...
[linux-2.6-omap-h63xx.git] / drivers / mtd / maps / tqm8xxl.c
index a43517053e7cfe4819a51f0c1974ffc767ef8251..37e4ded9b60033c2b8dce6005953d77687c3d41c 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) {