summaryrefslogtreecommitdiffstats
path: root/drivers/mtd/maps/ixp4xx.c
diff options
context:
space:
mode:
authorJon Ringle <jon@ringle.org>2010-01-13 15:36:10 +0100
committerDavid Woodhouse <David.Woodhouse@intel.com>2010-02-25 12:28:56 +0100
commit53f2b1c86a1fa1414be93571062ac4c263fa9fbc (patch)
tree62bfe4d6e07f211f6aa004dc0643f8c3fd850800 /drivers/mtd/maps/ixp4xx.c
parentmtd: mxc-nand: don't disable clock in mxcnd-suspend (diff)
downloadlinux-53f2b1c86a1fa1414be93571062ac4c263fa9fbc.tar.xz
linux-53f2b1c86a1fa1414be93571062ac4c263fa9fbc.zip
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 <jon@ringle.org> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'drivers/mtd/maps/ixp4xx.c')
-rw-r--r--drivers/mtd/maps/ixp4xx.c4
1 files changed, 2 insertions, 2 deletions
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;
}