Linux bluetooth development
 help / color / mirror / Atom feed
From: Peng Chen <pengchen@qca.qualcomm.com>
To: <gustavo@padovan.org>
Cc: <linux-bluetooth@vger.kernel.org>, <marcel@holtmann.org>,
	Peng Chen <pengchen@qca.qualcomm.com>
Subject: [PATCH] Fix endian safe issue, make driver work on both little and big endian cpu.
Date: Thu, 6 Sep 2012 19:30:43 +0800	[thread overview]
Message-ID: <1346931043-11541-1-git-send-email-pengchen@qca.qualcomm.com> (raw)


Signed-off-by: Peng Chen <pengchen@qca.qualcomm.com>
---
 drivers/bluetooth/ath3k.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/bluetooth/ath3k.c b/drivers/bluetooth/ath3k.c
index 10308cd..e63aee1 100644
--- a/drivers/bluetooth/ath3k.c
+++ b/drivers/bluetooth/ath3k.c
@@ -299,7 +299,7 @@ static int ath3k_load_patch(struct usb_device *udev)
 	}
 
 	snprintf(filename, ATH3K_NAME_LEN, "ar3k/AthrBT_0x%08x.dfu",
-		fw_version.rom_version);
+		le32_to_cpu(fw_version.rom_version));
 
 	ret = request_firmware(&firmware, filename, &udev->dev);
 	if (ret < 0) {
@@ -361,7 +361,7 @@ static int ath3k_load_syscfg(struct usb_device *udev)
 	}
 
 	snprintf(filename, ATH3K_NAME_LEN, "ar3k/ramps_0x%08x_%d%s",
-		fw_version.rom_version, clk_value, ".dfu");
+		le32_to_cpu(fw_version.rom_version), clk_value, ".dfu");
 
 	ret = request_firmware(&firmware, filename, &udev->dev);
 	if (ret < 0) {
-- 
1.7.9.5

             reply	other threads:[~2012-09-06 11:30 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-06 11:30 Peng Chen [this message]
2014-03-07 18:13 ` [PATCH] Fix endian safe issue, make driver work on both little and big endian cpu Johan Hedberg

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=1346931043-11541-1-git-send-email-pengchen@qca.qualcomm.com \
    --to=pengchen@qca.qualcomm.com \
    --cc=gustavo@padovan.org \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=marcel@holtmann.org \
    /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