From: Jon Ringle Date: Wed, 13 Jan 2010 14:36:10 +0000 (-0500) Subject: mtd: ixp4xx: fix reading from half-word boundary X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=53f2b1c86a1fa1414be93571062ac4c263fa9fbc;p=linux-beck.git mtd: ixp4xx: fix reading from half-word boundary Fix handling of reads that don't start on a half-word boundary. Signed-off-by: Jon Ringle Signed-off-by: Artem Bityutskiy Signed-off-by: David Woodhouse --- diff --git a/drivers/mtd/maps/ixp4xx.c b/drivers/mtd/maps/ixp4xx.c index 7b0515297411..7513d90fee6f 100644 --- a/drivers/mtd/maps/ixp4xx.c +++ b/drivers/mtd/maps/ixp4xx.c @@ -107,8 +107,8 @@ static void ixp4xx_copy_from(struct map_info *map, void *to, return; if (from & 1) { - *dest++ = BYTE1(flash_read16(src)); - src++; + *dest++ = BYTE1(flash_read16(src-1)); + src++; --len; }