From 2548558445b43c1f18a61c0bd3629f92dffa612e Mon Sep 17 00:00:00 2001 From: Michal Simek Date: Wed, 29 Sep 2010 15:52:13 +1000 Subject: of: MTD: Fix OF probing on little-endian systems Convert big-endian DTB to little-endian if necessary. Signed-off-by: Michal Simek Signed-off-by: Grant Likely --- drivers/mtd/maps/physmap_of.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/mtd/maps') diff --git a/drivers/mtd/maps/physmap_of.c b/drivers/mtd/maps/physmap_of.c index fe63f6bd663c..ec3edf6e68b4 100644 --- a/drivers/mtd/maps/physmap_of.c +++ b/drivers/mtd/maps/physmap_of.c @@ -294,7 +294,7 @@ static int __devinit of_flash_probe(struct platform_device *dev, info->list[i].map.name = dev_name(&dev->dev); info->list[i].map.phys = res.start; info->list[i].map.size = res_size; - info->list[i].map.bankwidth = *width; + info->list[i].map.bankwidth = be32_to_cpup(width); err = -ENOMEM; info->list[i].map.virt = ioremap(info->list[i].map.phys, -- cgit v1.2.3