/*
* 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>
#include "yaffs_flashif.h"
#include "yaffs_guts.h"
-#include "devextras.h"
#define SIZE_IN_MB 16
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;
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;
}
{
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));