mtd/include/linux/mtd map.h,1.41,1.42

David Woodhouse dwmw2 at infradead.org
Wed Jul 14 07:19:31 EDT 2004


Update of /home/cvs/mtd/include/linux/mtd
In directory phoenix.infradead.org:/tmp/cvs-serv566

Modified Files:
	map.h 
Log Message:
Fix map_word_load_partial(). Use unsigned char, and fix shift on BE


Index: map.h
===================================================================
RCS file: /home/cvs/mtd/include/linux/mtd/map.h,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -r1.41 -r1.42
--- map.h	13 Jul 2004 22:32:34 -0000	1.41
+++ map.h	14 Jul 2004 11:19:28 -0000	1.42
@@ -300,7 +300,7 @@
 	return r;
 }
 
-static inline map_word map_word_load_partial(struct map_info *map, map_word orig, const char *buf, int start, int len)
+static inline map_word map_word_load_partial(struct map_info *map, map_word orig, const unsigned char *buf, int start, int len)
 {
 	int i;
 
@@ -313,7 +313,7 @@
 #ifdef __LITTLE_ENDIAN
 			bitpos = i*8;
 #else /* __BIG_ENDIAN */
-			bitpos = (map_bankwidth(map)-i)*8;
+			bitpos = (map_bankwidth(map)-1-i)*8;
 #endif
 			orig.x[0] &= ~(0xff << bitpos);
 			orig.x[0] |= buf[i] << bitpos;





More information about the linux-mtd-cvs mailing list