[MTD] [NOR] STAA: use writesize instead off eccsize to represent ECC block

Linux-MTD Mailing List linux-mtd at lists.infradead.org
Fri Feb 9 10:59:03 EST 2007


Gitweb:     http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=992c9d24c417afce9792da18f8e664c6b9802c5c
Commit:     992c9d24c417afce9792da18f8e664c6b9802c5c
Parent:     480b9dfb1fbeb783d4c0061df7868c39af91afec
Author:     Artem Bityutskiy <Artem.Bityutskiy at nokia.com>
AuthorDate: Mon Jan 29 12:05:03 2007 +0200
Committer:  David Woodhouse <dwmw2 at infradead.org>
CommitDate: Fri Feb 9 15:26:10 2007 +0000

    [MTD] [NOR] STAA: use writesize instead off eccsize to represent ECC block
    
    The cfi_staa_write_buffers() uses mtd->eccsize but means mtd->writesize.
    BTW, mtd-eccsize is broken and is not initialized, which means the code
    fixed by this patch is broken/unused anyway.
    
    Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy at nokia.com>
    Signed-off-by: David Woodhouse <dwmw2 at infradead.org>
---
 drivers/mtd/chips/cfi_cmdset_0020.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/mtd/chips/cfi_cmdset_0020.c b/drivers/mtd/chips/cfi_cmdset_0020.c
index d56849f..69d49e0 100644
--- a/drivers/mtd/chips/cfi_cmdset_0020.c
+++ b/drivers/mtd/chips/cfi_cmdset_0020.c
@@ -662,7 +662,7 @@ static int cfi_staa_write_buffers (struct mtd_info *mtd, loff_t to,
  * a small buffer for this.
  * XXX: If the buffer size is not a multiple of 2, this will break
  */
-#define ECCBUF_SIZE (mtd->eccsize)
+#define ECCBUF_SIZE (mtd->writesize)
 #define ECCBUF_DIV(x) ((x) & ~(ECCBUF_SIZE - 1))
 #define ECCBUF_MOD(x) ((x) &  (ECCBUF_SIZE - 1))
 static int



More information about the linux-mtd-cvs mailing list