diff -Nurp y0/fs/yaffs/yaffs_fs.c y1/fs/yaffs/yaffs_fs.c --- y0/fs/yaffs/yaffs_fs.c Fri Jan 28 02:32:17 2005 +++ y1/fs/yaffs/yaffs_fs.c Fri Jan 28 02:39:58 2005 @@ -153,7 +153,11 @@ static void yaffs_delete_inode(struct in static void yaffs_clear_inode(struct inode *); static int yaffs_readpage(struct file *file, struct page * page); +#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,0)) +static int yaffs_writepage(struct page *page, struct writeback_control *wbc); +#else static int yaffs_writepage(struct page *page); +#endif static int yaffs_prepare_write(struct file *f, struct page *pg, unsigned offset, unsigned to); static int yaffs_commit_write(struct file *f, struct page *pg, unsigned offset, unsigned to); @@ -504,7 +508,11 @@ static int yaffs_readpage(struct file *f // writepage inspired by/stolen from smbfs // +#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,0)) +static int yaffs_writepage(struct page *page, struct writeback_control *wbc) +#else static int yaffs_writepage(struct page *page) +#endif { struct address_space *mapping = page->mapping; struct inode *inode; @@ -1306,7 +1314,11 @@ static struct super_block *yaffs_interna #ifdef CONFIG_YAFFS_RAM_ENABLED // Set the yaffs_Device up for ram emulation +#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0)) + sb->s_fs_info = dev = kmalloc(sizeof(yaffs_Device),GFP_KERNEL); +#else sb->u.generic_sbp = dev = kmalloc(sizeof(yaffs_Device),GFP_KERNEL); +#endif if(!dev) { // Deep shit could not allocate device structure @@ -1530,13 +1542,12 @@ static struct super_block *yaffs_ram_rea /* changes NCB 2.5.70 */ //static DECLARE_FSTYPE(yaffs_fs_type, "yaffs", yaffs_read_super, FS_REQUIRES_DEV); -static struct file_system_type yaffs_fs_type = { +static struct file_system_type yaffs_ram_fs_type = { .owner = THIS_MODULE, .name = "yaffsram", .get_sb = yaffs_ram_read_super, .kill_sb = kill_block_super, // .kill_sb = kill_litter_super, - .fs_flags = FS_SINGLE, }; #else static struct super_block *yaffs_ram_read_super(struct super_block * sb, void * data, int silent) diff -Nurp y0/fs/yaffs/yaffs_ramem.c y1/fs/yaffs/yaffs_ramem.c --- y0/fs/yaffs/yaffs_ramem.c Fri Jan 28 02:32:17 2005 +++ y1/fs/yaffs/yaffs_ramem.c Fri Jan 28 02:35:43 2005 @@ -19,6 +19,8 @@ const char *yaffs_ramem_c_version = "$Id #ifndef __KERNEL__ #define CONFIG_YAFFS_RAM_ENABLED +#else +#include #endif #ifdef CONFIG_YAFFS_RAM_ENABLED @@ -33,10 +35,10 @@ const char *yaffs_ramem_c_version = "$Id #define EM_SIZE_IN_MEG 2 -#define BLOCK_SIZE (32 * 528) +#define NAND_BLOCK_SIZE (32 * 528) #define BLOCKS_PER_MEG ((1024*1024)/(32 * 512)) #define FILE_SIZE_IN_BLOCKS (FILE_SIZE_IN_MEG * BLOCKS_PER_MEG) -#define FILE_SIZE_IN_BYTES (FILE_SIZE_IN_BLOCKS * BLOCK_SIZE) +#define FILE_SIZE_IN_BYTES (FILE_SIZE_IN_BLOCKS * NAND_BLOCK_SIZE)