Skip to content

Commit

Permalink
[MTD] DiskOnChip: big endian fix for NFTL devices
Browse files Browse the repository at this point in the history
Make NFTL devices work on big endian machines.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
  • Loading branch information
Thomas Gleixner authored and Thomas Gleixner committed May 23, 2005
1 parent 3960539 commit f29a4b8
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion drivers/mtd/nand/diskonchip.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -1122,6 +1122,10 @@ static inline int __init nftl_partscan(struct mtd_info *mtd,
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"
Expand Down

0 comments on commit f29a4b8

Please sign in to comment.