yaffs: Remove a whole lot of function wrappers and forward declarations
[yaffs2.git] / direct / basic-test / yaffs_ramdisk.c
index e2020286801cab92c456d43b609ae1e43504bbd1..88fc3a4f3f952242a3ed32d59e468df9d40f0df9 100644 (file)
@@ -26,7 +26,6 @@ const char *yaffs_ramdisk_c_version = "$Id: yaffs_ramdisk.c,v 1.6 2010-01-11 04:
 
 #include "yaffs_ramdisk.h"
 #include "yaffs_guts.h"
-#include "devextras.h"
 #include "yaffs_packedtags1.h"
 
 
@@ -80,7 +79,7 @@ static int  CheckInit(struct yaffs_dev *dev)
        
        ramdisk.nBlocks = (SIZE_IN_MB * 1024 * 1024)/(16 * 1024);
        
-       ramdisk.block = YMALLOC(sizeof(yramdisk_block *) * ramdisk.nBlocks);
+       ramdisk.block = malloc(sizeof(yramdisk_block *) * ramdisk.nBlocks);
        
        if(!ramdisk.block) return 0;
        
@@ -91,7 +90,7 @@ static int  CheckInit(struct yaffs_dev *dev)
        
        for(i=0; i <ramdisk.nBlocks && !fail; i++)
        {
-               if((ramdisk.block[i] = YMALLOC(sizeof(yramdisk_block))) == 0)
+               if((ramdisk.block[i] = malloc(sizeof(yramdisk_block))) == 0)
                {
                        fail = 1;
                }
@@ -106,9 +105,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 * 528));