]> pilppa.org Git - familiar-h63xx-build.git/blob - org.handhelds.familiar/packages/linux/openslug-kernel-2.6.11/ixp4xx_copy_from.patch
OE tree imported from monotone branch org.openembedded.oz354fam083 at revision 8b12e3...
[familiar-h63xx-build.git] / org.handhelds.familiar / packages / linux / openslug-kernel-2.6.11 / ixp4xx_copy_from.patch
1 --- linux-2.6.11/drivers/mtd/maps/ixp4xx.c.orig 2005-03-05 20:00:28.000000000 +0100
2 +++ linux-2.6.11/drivers/mtd/maps/ixp4xx.c      2005-03-05 22:10:48.000000000 +0100
3 @@ -29,6 +29,8 @@
4  #include <asm/mach-types.h>
5  #include <asm/mach/flash.h>
6  
7 +#include <asm/unaligned.h>
8 +
9  #include <linux/reboot.h>
10  
11  #ifndef __ARMEB__
12 @@ -60,13 +62,13 @@ static void ixp4xx_copy_from(struct map_
13         u16 data;
14  
15         for (i = 0; i < (len / 2); i++) {
16 -               data = src[i];
17 +               data = get_unaligned((u16*)(src + i));
18                 dest[i * 2] = BYTE0(data);
19                 dest[i * 2 + 1] = BYTE1(data);
20         }
21  
22         if (len & 1)
23 -               dest[len - 1] = BYTE0(src[i]);
24 +               dest[len - 1] = BYTE0(get_unaligned((u16*)(src + i)));
25  }
26  
27  /*