Have updated yaffs direct tests and added README files to the tests.
[yaffs2.git] / direct / yaffs_flashif.c
index 85958044d0618bc2a03f2cda88a27349e64f4233..f7c1998d996c3073ff0f709d77b9c25fdcc0f2be 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * YAFFS: Yet Another Flash File System. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
  *   for Toby Churchill Ltd and Brightstar Engineering
  *
  * Created by Charles Manning <charles@aleph1.co.uk>
@@ -67,7 +67,7 @@ static int  CheckInit(struct yaffs_dev *dev)
        
        ramdisk.nBlocks = (SIZE_IN_MB * 1024 * 1024)/(16 * 1024);
        
-       ramdisk.block = YMALLOC(sizeof(yflash_Block *) * ramdisk.nBlocks);
+       ramdisk.block = kmalloc(sizeof(yflash_Block *) * ramdisk.nBlocks);
        
        if(!ramdisk.block) return 0;
        
@@ -78,7 +78,7 @@ static int  CheckInit(struct yaffs_dev *dev)
        
        for(i=0; i <ramdisk.nBlocks && !fail; i++)
        {
-               if((ramdisk.block[i] = YMALLOC(sizeof(yflash_Block))) == 0)
+               if((ramdisk.block[i] = kmalloc(sizeof(yflash_Block))) == 0)
                {
                        fail = 1;
                }
@@ -93,9 +93,9 @@ static int  CheckInit(struct yaffs_dev *dev)
        {
                for(i = 0; i < nAllocated; i++)
                {
-                       YFREE(ramdisk.block[i]);
+                       kfree(ramdisk.block[i]);
                }
-               YFREE(ramdisk.block);
+               kfree(ramdisk.block);
                
                T(YAFFS_TRACE_ALWAYS,("Allocation failed, could only allocate %dMB of %dMB requested.\n",
                   nAllocated/64,ramdisk.nBlocks * YAFFS_BYTES_PER_BLOCK));