yaffs: Remove a whole lot of function wrappers and forward declarations
[yaffs2.git] / direct / yaffs_flashif.c
index 8595804..95ac613 100644 (file)
@@ -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));