Skip to contentSkip to conversation

of: xsysace: Fix OF probing on little-endian systems

PATCH Applied Michal Simek 2 participants 2 messages Oct 18, 2010 Block layer

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 of: xsysace: Fix OF probing on little-endian systems

Convert big-endian DTB to little-endian if necessary.

---
 drivers/block/xsysace.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
drivers/block/xsysace.c +2 -1
index 057413b..66911d3 100644
@@ -1224,7 +1224,8 @@ ace_of_probe(struct platform_device *op, const struct of_device_id *match)
 		bus_width = ACE_BUS_WIDTH_8;
 
 	/* Call the bus-independant setup code */
-	return ace_alloc(&op->dev, id ? *id : 0, physaddr, irq, bus_width);
+	return ace_alloc(&op->dev, id ? be32_to_cpup(id) : 0,
+						physaddr, irq, bus_width);
 }
 
 static int __devexit ace_of_remove(struct platform_device *op)
Signature · 1 line
1.6.4.182.g9ebfd
Applied
#1 lore raw
Quoted 3 lines · Michal Simek

Convert big-endian DTB to little-endian if necessary.

Applied, thanks.

g.

Quoted 21 lines
---
 drivers/block/xsysace.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
drivers/block/xsysace.c +2 -1
index 057413b..66911d3 100644
@@ -1224,7 +1224,8 @@ ace_of_probe(struct platform_device *op, const struct of_device_id *match)
 		bus_width = ACE_BUS_WIDTH_8;
 
 	/* Call the bus-independant setup code */
-	return ace_alloc(&op->dev, id ? *id : 0, physaddr, irq, bus_width);
+	return ace_alloc(&op->dev, id ? be32_to_cpup(id) : 0,
+						physaddr, irq, bus_width);
 }
 
 static int __devexit ace_of_remove(struct platform_device *op)
Signature · 1 line
1.6.4.182.g9ebfd