X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs2.git;a=blobdiff_plain;f=yaffs_mtdif1.c;h=2b33c2cfea6f19cb441a9d1ee3687231ef6e90e1;hp=c5a02c7bf0d1b45588705321c2bf825e464c156a;hb=a4d9ea92251deb3c1389e3e3443faf4341f817db;hpb=6c8aa53c1fa0324c0c24c0d00206465a0ec20fd7 diff --git a/yaffs_mtdif1.c b/yaffs_mtdif1.c index c5a02c7..2b33c2c 100644 --- a/yaffs_mtdif1.c +++ b/yaffs_mtdif1.c @@ -34,9 +34,9 @@ #include "linux/mtd/mtd.h" /* Don't compile this module if we don't have MTD's mtd_oob_ops interface */ -#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,17)) +#if (MTD_VERSION_CODE > MTD_VERSION(2,6,17)) -const char *yaffs_mtdif1_c_version = "$Id: yaffs_mtdif1.c,v 1.4 2007-10-01 19:43:12 imcd Exp $"; +const char *yaffs_mtdif1_c_version = "$Id: yaffs_mtdif1.c,v 1.7 2007-12-13 15:35:18 wookey Exp $"; #ifndef CONFIG_YAFFS_9BYTE_TAGS # define YTAG1_SIZE 8 @@ -189,7 +189,7 @@ int nandmtd1_ReadChunkWithTagsFromNAND(yaffs_Device *dev, ops.datbuf = data; ops.oobbuf = (__u8 *)&pt1; -#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,20)) +#if (MTD_VERSION_CODE < MTD_VERSION(2,6,20)) /* In MTD 2.6.18 to 2.6.19 nand_base.c:nand_do_read_oob() has a bug; * help it out with ops.len = ops.ooblen when ops.datbuf == NULL. */ @@ -288,14 +288,14 @@ int nandmtd1_MarkNANDBlockBad(struct yaffs_DeviceStruct *dev, int blockNo) int blocksize = dev->nChunksPerBlock * dev->nDataBytesPerChunk; int retval; - yaffs_trace(YAFFS_TRACE_BAD_BLOCKS, "marking block %d bad", blockNo); + yaffs_trace(YAFFS_TRACE_BAD_BLOCKS, "marking block %d bad\n", blockNo); retval = mtd->block_markbad(mtd, (loff_t)blocksize * blockNo); return (retval) ? YAFFS_FAIL : YAFFS_OK; } /* Check any MTD prerequists. - * + * * Returns YAFFS_OK or YAFFS_FAIL. */ static int nandmtd1_TestPrerequists(struct mtd_info * mtd) @@ -344,7 +344,7 @@ int nandmtd1_QueryNANDBlock(struct yaffs_DeviceStruct *dev, int blockNo, etags.blockBad = (mtd->block_isbad)(mtd, addr); if (etags.blockBad) { yaffs_trace(YAFFS_TRACE_BAD_BLOCKS, - "block %d is marked bad", blockNo); + "block %d is marked bad\n", blockNo); state = YAFFS_BLOCK_STATE_DEAD; } else if (etags.eccResult != YAFFS_ECC_RESULT_NO_ERROR) { @@ -366,4 +366,4 @@ int nandmtd1_QueryNANDBlock(struct yaffs_DeviceStruct *dev, int blockNo, return YAFFS_OK; } -#endif /*KERNEL_VERSION*/ +#endif /*MTD_VERSION*/