[MTD] [NAND] S3C2412 fix hw ecc
[powerpc.git] / drivers / mtd / devices / mtdram.c
index bb713fe..e427c82 100644 (file)
@@ -10,7 +10,6 @@
  *
  */
 
-#include <linux/config.h>
 #include <linux/module.h>
 #include <linux/slab.h>
 #include <linux/ioport.h>
@@ -91,8 +90,7 @@ static void __exit cleanup_mtdram(void)
 {
        if (mtd_info) {
                del_mtd_device(mtd_info);
-               if (mtd_info->priv)
-                       vfree(mtd_info->priv);
+               vfree(mtd_info->priv);
                kfree(mtd_info);
        }
 }
@@ -107,6 +105,7 @@ int mtdram_init_device(struct mtd_info *mtd, void *mapped_address,
        mtd->type = MTD_RAM;
        mtd->flags = MTD_CAP_RAM;
        mtd->size = size;
+       mtd->writesize = 1;
        mtd->erasesize = MTDRAM_ERASE_SIZE;
        mtd->priv = mapped_address;