Skip to contentSkip to conversation

maps/ixp4xx: Fix reading from half-word boundary

PATCH In review Jon Ringle 2 participants 2 messages Jan 13, 2010 – Jan 28, 2010 Memory technology devices (MTD)

lore
Share & tools
lore

Jon Ringle

author
#0 lore raw

PATCH 1/1 maps/ixp4xx: Fix reading from half-word boundary

ixp4xx updates:
- Fix handling of reads that don't start on a half-word boundary.

---
 drivers/mtd/maps/ixp4xx.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/mtd/maps/ixp4xx.c +2 -2
index 7214b87..6b540a5 100644
@@ -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;
 	}
 
Signature · 1 line
1.6.5.rc2
#1 lore raw
Quoted 5 lines · Jon Ringle

ixp4xx updates:
- Fix handling of reads that don't start on a half-word boundary.

I've pushed this patch to my l2-mtd-2.6.git/master tree

Signature · 2 lines
Best Regards,
Artem Bityutskiy (Артём Битюцкий)