#include <asm/uaccess.h>
#include <linux/mtd/mtd.h>
#include <linux/mtd/partitions.h>
-
+#include <linux/mtd/nand.h>
#define T(x) printk x
#define ALLOCATE(x) kmalloc(x,GFP_KERNEL)
/*
* Scan for the NAND device
*/
-int nand_scan (struct mtd_info *mtd)
+int nand_scan (struct mtd_info *mtd,int maxchips)
{
mtd->oobblock = 512;
mtd->oobsize = 16;
/* Fill in remaining MTD driver data */
mtd->type = MTD_NANDFLASH;
mtd->flags = MTD_CAP_NANDFLASH;
- mtd->module = THIS_MODULE;
+ mtd->owner = THIS_MODULE;
mtd->ecctype = MTD_ECC_NONE;
mtd->erase = nand_erase;
mtd->point = NULL;
// Do the nand init
- nand_scan(&nandemul_mtd);
+ nand_scan(&nandemul_mtd,1);
nandemul_Initialise();