summaryrefslogtreecommitdiffstats
path: root/drivers/mtd/nand/mpc5121_nfc.c
diff options
context:
space:
mode:
authorIan Munsie <imunsie@au1.ibm.com>2010-10-01 17:06:08 +1000
committerDavid Woodhouse <David.Woodhouse@intel.com>2010-10-25 00:55:56 +0100
commit766f271a63d1ee7caed8030736e6aed253d02073 (patch)
tree198b4cf3efd5de59121bdca483a095b8234b588a /drivers/mtd/nand/mpc5121_nfc.c
parentd86fbdb8ed0ac957693ff475cca076021677166a (diff)
downloadop-kernel-dev-766f271a63d1ee7caed8030736e6aed253d02073.zip
op-kernel-dev-766f271a63d1ee7caed8030736e6aed253d02073.tar.gz
mtd: Fix endianness issues from device tree
This patch adds the appropriate conversions to correct the endianness issues in the MTD driver whenever it accesses the device tree (which is always big endian). Signed-off-by: Ian Munsie <imunsie@au1.ibm.com> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'drivers/mtd/nand/mpc5121_nfc.c')
-rw-r--r--drivers/mtd/nand/mpc5121_nfc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/mtd/nand/mpc5121_nfc.c b/drivers/mtd/nand/mpc5121_nfc.c
index f4610bc..469e649 100644
--- a/drivers/mtd/nand/mpc5121_nfc.c
+++ b/drivers/mtd/nand/mpc5121_nfc.c
@@ -663,7 +663,7 @@ static int __devinit mpc5121_nfc_probe(struct platform_device *op,
#endif
struct nand_chip *chip;
unsigned long regs_paddr, regs_size;
- const uint *chips_no;
+ const __be32 *chips_no;
int resettime = 0;
int retval = 0;
int rev, len;
@@ -806,7 +806,7 @@ static int __devinit mpc5121_nfc_probe(struct platform_device *op,
}
/* Detect NAND chips */
- if (nand_scan(mtd, *chips_no)) {
+ if (nand_scan(mtd, be32_to_cpup(chips_no))) {
dev_err(dev, "NAND Flash not found !\n");
devm_free_irq(dev, prv->irq, mtd);
retval = -ENXIO;
OpenPOWER on IntegriCloud