X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=drivers%2Fmtd%2Fdevices%2Fmtdram.c;h=e427c82d5f4cb046ff4234e4ce8919062569fda3;hb=fe6ea1f7e5c2d3947bf62f2a219e69718ca0b187;hp=bb713fed2f373c66fd13e8f29be3abbc733963bb;hpb=31151ba2cef171344beac254e65bd7e00138bb0d;p=linux-2.6 diff --git a/drivers/mtd/devices/mtdram.c b/drivers/mtd/devices/mtdram.c index bb713fed2f..e427c82d5f 100644 --- a/drivers/mtd/devices/mtdram.c +++ b/drivers/mtd/devices/mtdram.c @@ -10,7 +10,6 @@ * */ -#include #include #include #include @@ -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;