X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs2.git;a=blobdiff_plain;f=yaffs_mtdif2.c;h=125ed40f31e0ea9ce930de9753ef5fd0066927a8;hp=d927c76737ebc796c0bdaf2f50efa5515010bc54;hb=457fb8efdcd9b61c657b8b03b942f048eaa5168c;hpb=e1ac494e05a5dc7ab61d799af815d103a11d318c diff --git a/yaffs_mtdif2.c b/yaffs_mtdif2.c index d927c76..125ed40 100644 --- a/yaffs_mtdif2.c +++ b/yaffs_mtdif2.c @@ -14,7 +14,7 @@ /* mtd interface for YAFFS2 */ const char *yaffs_mtdif2_c_version = - "$Id: yaffs_mtdif2.c,v 1.17 2007-02-14 01:09:06 wookey Exp $"; + "$Id: yaffs_mtdif2.c,v 1.19 2007-12-13 15:35:18 wookey Exp $"; #include "yportenv.h" @@ -32,7 +32,7 @@ int nandmtd2_WriteChunkWithTagsToNAND(yaffs_Device * dev, int chunkInNAND, const yaffs_ExtendedTags * tags) { struct mtd_info *mtd = (struct mtd_info *)(dev->genericDevice); -#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,17)) +#if (MTD_VERSION_CODE > MTD_VERSION(2,6,17)) struct mtd_oob_ops ops; #else size_t dummy; @@ -48,7 +48,7 @@ int nandmtd2_WriteChunkWithTagsToNAND(yaffs_Device * dev, int chunkInNAND, ("nandmtd2_WriteChunkWithTagsToNAND chunk %d data %p tags %p" TENDSTR), chunkInNAND, data, tags)); -#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,17)) +#if (MTD_VERSION_CODE > MTD_VERSION(2,6,17)) if (tags) yaffs_PackTags2(&pt, tags); else @@ -101,7 +101,7 @@ int nandmtd2_ReadChunkWithTagsFromNAND(yaffs_Device * dev, int chunkInNAND, __u8 * data, yaffs_ExtendedTags * tags) { struct mtd_info *mtd = (struct mtd_info *)(dev->genericDevice); -#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,17)) +#if (MTD_VERSION_CODE > MTD_VERSION(2,6,17)) struct mtd_oob_ops ops; #endif size_t dummy; @@ -116,7 +116,7 @@ int nandmtd2_ReadChunkWithTagsFromNAND(yaffs_Device * dev, int chunkInNAND, ("nandmtd2_ReadChunkWithTagsFromNAND chunk %d data %p tags %p" TENDSTR), chunkInNAND, data, tags)); -#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,17)) +#if (MTD_VERSION_CODE > MTD_VERSION(2,6,17)) if (data && !tags) retval = mtd->read(mtd, addr, dev->nDataBytesPerChunk, &dummy, data); @@ -158,7 +158,7 @@ int nandmtd2_ReadChunkWithTagsFromNAND(yaffs_Device * dev, int chunkInNAND, if (tags) yaffs_UnpackTags2(tags, &pt); - + if(tags && retval == -EBADMSG && tags->eccResult == YAFFS_ECC_RESULT_NO_ERROR) tags->eccResult = YAFFS_ECC_RESULT_UNFIXED;