mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Michal Simek <monstr@monstr.eu>
To: linux-kernel@vger.kernel.org
Cc: grant.likely@secretlab.ca, jaxboe@fusionio.com,
	hch@infradead.org, smaclennan@pikatech.com,
	michal.simek@petalogix.com, john.williams@petalogix.com,
	Michal Simek <monstr@monstr.eu>
Subject: [PATCH] of: xsysace: Fix OF probing on little-endian systems
Date: Mon, 18 Oct 2010 15:33:09 +1000	[thread overview]
Message-ID: <1287379989-10772-1-git-send-email-monstr@monstr.eu> (raw)

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

Signed-off-by: Michal Simek <monstr@monstr.eu>
---
 drivers/block/xsysace.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/drivers/block/xsysace.c b/drivers/block/xsysace.c
index 057413b..66911d3 100644
--- a/drivers/block/xsysace.c
+++ b/drivers/block/xsysace.c
@@ -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)
-- 
1.6.4.182.g9ebfd


             reply	other threads:[~2010-10-18  5:33 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-18  5:33 Michal Simek [this message]
2010-10-18 15:50 ` Grant Likely

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1287379989-10772-1-git-send-email-monstr@monstr.eu \
    --to=monstr@monstr.eu \
    --cc=grant.likely@secretlab.ca \
    --cc=hch@infradead.org \
    --cc=jaxboe@fusionio.com \
    --cc=john.williams@petalogix.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=michal.simek@petalogix.com \
    --cc=smaclennan@pikatech.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®