tree 3ee3ed311f5d01c460ffe7c9605afda922e331a4
parent 39605398cd45941b4ed2026c666a1a9f39c40490
author Thomas Gleixner <[EMAIL PROTECTED]> Mon, 31 Jan 2005 22:22:24 +0000
committer Thomas Gleixner <[EMAIL PROTECTED]> Mon, 23 May 2005 12:18:59 +0200

[MTD] DiskOnChip: big endian fix for NFTL devices

Make NFTL devices work on big endian machines.

Signed-off-by: Thomas Gleixner <[EMAIL PROTECTED]>

 drivers/mtd/nand/diskonchip.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/mtd/nand/diskonchip.c b/drivers/mtd/nand/diskonchip.c
--- a/drivers/mtd/nand/diskonchip.c
+++ b/drivers/mtd/nand/diskonchip.c
@@ -16,7 +16,7 @@
  *  
  * Interface to generic NAND code for M-Systems DiskOnChip devices
  *
- * $Id: diskonchip.c,v 1.47 2005/01/31 22:21:15 gleixner Exp $
+ * $Id: diskonchip.c,v 1.48 2005/01/31 22:22:21 gleixner Exp $
  */
 
 #include <linux/kernel.h>
@@ -1122,6 +1122,10 @@ static inline int __init nftl_partscan(s
        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"
-
To unsubscribe from this list: send the line "unsubscribe bk-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to