Changes for more recent kernels
[yaffs/.git] / mtdemul / nandemul.c
index 12fe39dc04320d14ca535f90830059e4f4bf663f..2bba97f55ba8e30873073374a30b69703cf65d35 100644 (file)
@@ -30,7 +30,7 @@
 #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)
@@ -638,7 +638,7 @@ static void nand_sync (struct mtd_info *mtd)
 /*
  * 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;
@@ -650,7 +650,7 @@ int nand_scan (struct mtd_info *mtd)
        /* 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;
@@ -702,7 +702,7 @@ int __init nandemul_init (void)
 
        // Do the nand init
 
-       nand_scan(&nandemul_mtd);
+       nand_scan(&nandemul_mtd,1);
 
        nandemul_Initialise();