mtd/drivers/mtd/nand diskonchip.c,1.47,1.48

gleixner at infradead.org gleixner at infradead.org
Mon Jan 31 17:22:24 EST 2005


Update of /home/cvs/mtd/drivers/mtd/nand
In directory phoenix.infradead.org:/tmp/cvs-serv20732

Modified Files:
	diskonchip.c 
Log Message:
Make NFTL devices work on big endian machines.

Index: diskonchip.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/nand/diskonchip.c,v
retrieving revision 1.47
retrieving revision 1.48
diff -u -r1.47 -r1.48
--- diskonchip.c	31 Jan 2005 22:21:15 -0000	1.47
+++ diskonchip.c	31 Jan 2005 22:22:21 -0000	1.48
@@ -1122,6 +1122,10 @@
 	if (!(numheaders=find_media_headers(mtd, buf, "ANAND", 1))) goto out;
 	mh = (struct NFTLMediaHeader *) buf;
 
+	mh->NumEraseUnits = le16_to_cpu(mh->NumEraseUnits);
+	mh->FirstPhysicalEUN = le16_to_cpu(mh->FirstPhysicalEUN);
+	mh->FormattedSize = le32_to_cpu(mh->FormattedSize);
+
 	printk(KERN_INFO "    DataOrgID        = %s\n"
 			 "    NumEraseUnits    = %d\n"
 			 "    FirstPhysicalEUN = %d\n"





More information about the linux-mtd-cvs mailing list