mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-12 05:48:40 +00:00
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>
This commit is contained in:
parent
9c14b153e6
commit
53f2b1c86a
1 changed files with 2 additions and 2 deletions
|
@ -107,8 +107,8 @@ static void ixp4xx_copy_from(struct map_info *map, void *to,
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (from & 1) {
|
if (from & 1) {
|
||||||
*dest++ = BYTE1(flash_read16(src));
|
*dest++ = BYTE1(flash_read16(src-1));
|
||||||
src++;
|
src++;
|
||||||
--len;
|
--len;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue