summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeng Chen <pengchen@qca.qualcomm.com>2012-09-06 19:30:43 +0800
committerJohan Hedberg <johan.hedberg@intel.com>2014-03-07 20:09:40 +0200
commitb9e2535acad8f52a17e2aa843d45a6b756b59592 (patch)
treee4062436966d94de16c0ac4c85771936f5f9d472
parent2606ecbc4880b8641b5e455c80f4bd72c223ce86 (diff)
downloadop-kernel-dev-b9e2535acad8f52a17e2aa843d45a6b756b59592.zip
op-kernel-dev-b9e2535acad8f52a17e2aa843d45a6b756b59592.tar.gz
Bluetooth: Fix endianess issue in the ath3k driver
The version is always in little endian format. This patch makes the driver work on both little and big endian CPUs. Signed-off-by: Peng Chen <pengchen@qca.qualcomm.com> Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
-rw-r--r--drivers/bluetooth/ath3k.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/bluetooth/ath3k.c b/drivers/bluetooth/ath3k.c
index bc5cf90..be571fe 100644
--- a/drivers/bluetooth/ath3k.c
+++ b/drivers/bluetooth/ath3k.c
@@ -367,7 +367,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) {
@@ -429,7 +429,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) {
OpenPOWER on IntegriCloud