Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 992c9d24 authored by Artem Bityutskiy's avatar Artem Bityutskiy Committed by David Woodhouse
Browse files

[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: default avatarArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
Signed-off-by: default avatarDavid Woodhouse <dwmw2@infradead.org>
parent 480b9dfb
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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