diff options
Diffstat (limited to 'fs/yaffs2/yaffs_mtdif1.c')
-rw-r--r-- | fs/yaffs2/yaffs_mtdif1.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/fs/yaffs2/yaffs_mtdif1.c b/fs/yaffs2/yaffs_mtdif1.c index aaa02db2f665..3e2a10a62d67 100644 --- a/fs/yaffs2/yaffs_mtdif1.c +++ b/fs/yaffs2/yaffs_mtdif1.c @@ -1,10 +1,11 @@ /* * YAFFS: Yet another FFS. A NAND-flash specific file system. - * yaffs_mtdif1.c NAND mtd interface functions for small-page NAND. * * Copyright (C) 2002-2010 Aleph One Ltd. * for Toby Churchill Ltd and Brightstar Engineering * + * Created by Charles Manning <charles@aleph1.co.uk> + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. @@ -91,7 +92,7 @@ static struct nand_ecclayout nand_oob_16 = { int nandmtd1_WriteChunkWithTagsToNAND(yaffs_Device *dev, int chunkInNAND, const __u8 *data, const yaffs_ExtendedTags *etags) { - struct mtd_info *mtd = yaffs_DeviceToContext(dev)->mtd; + struct mtd_info *mtd = yaffs_DeviceToMtd(dev); int chunkBytes = dev->nDataBytesPerChunk; loff_t addr = ((loff_t)chunkInNAND) * chunkBytes; struct mtd_oob_ops ops; @@ -169,7 +170,7 @@ static int rettags(yaffs_ExtendedTags *etags, int eccResult, int retval) int nandmtd1_ReadChunkWithTagsFromNAND(yaffs_Device *dev, int chunkInNAND, __u8 *data, yaffs_ExtendedTags *etags) { - struct mtd_info *mtd = yaffs_DeviceToContext(dev)->mtd; + struct mtd_info *mtd = yaffs_DeviceToMtd(dev); int chunkBytes = dev->nDataBytesPerChunk; loff_t addr = ((loff_t)chunkInNAND) * chunkBytes; int eccres = YAFFS_ECC_RESULT_NO_ERROR; @@ -280,7 +281,7 @@ int nandmtd1_ReadChunkWithTagsFromNAND(yaffs_Device *dev, */ int nandmtd1_MarkNANDBlockBad(struct yaffs_DeviceStruct *dev, int blockNo) { - struct mtd_info *mtd = yaffs_DeviceToContext(dev)->mtd; + struct mtd_info *mtd = yaffs_DeviceToMtd(dev); int blocksize = dev->param.nChunksPerBlock * dev->nDataBytesPerChunk; int retval; @@ -321,7 +322,7 @@ static int nandmtd1_TestPrerequists(struct mtd_info *mtd) int nandmtd1_QueryNANDBlock(struct yaffs_DeviceStruct *dev, int blockNo, yaffs_BlockState *pState, __u32 *pSequenceNumber) { - struct mtd_info *mtd = yaffs_DeviceToContext(dev)->mtd; + struct mtd_info *mtd = yaffs_DeviceToMtd(dev); int chunkNo = blockNo * dev->param.nChunksPerBlock; loff_t addr = (loff_t)chunkNo * dev->nDataBytesPerChunk; yaffs_ExtendedTags etags; |