From: Peng Chen Date: Thu, 6 Sep 2012 11:30:43 +0000 (+0800) Subject: Bluetooth: Fix endianess issue in the ath3k driver X-Git-Tag: v3.12.33~181 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fa982cfbc81a2a0e3ada5ebfe9c8b48e3aed57ec;p=thirdparty%2Fkernel%2Fstable.git Bluetooth: Fix endianess issue in the ath3k driver commit b9e2535acad8f52a17e2aa843d45a6b756b59592 upstream. 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 Signed-off-by: Johan Hedberg Signed-off-by: Jiri Slaby --- diff --git a/drivers/bluetooth/ath3k.c b/drivers/bluetooth/ath3k.c index 2acabdaecec87..ed48ce54278c8 100644 --- a/drivers/bluetooth/ath3k.c +++ b/drivers/bluetooth/ath3k.c @@ -356,7 +356,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) { @@ -418,7 +418,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) {